Skip to content
  • Marc-André Lureau's avatar
    util: fix __FUNCTION__ pedantic warning · 61d888ec
    Marc-André Lureau authored
    
    
    Include p_compiler.h from u_debug.h to fix -Wpedantic warnings:
    
    In file included from ../src/mesa/util/u_memory.h:37,
                     from ../src/mesa/util/hash_table.c:50:
    ../src/mesa/util/fast_urem_by_const.h: In function ‘util_fast_urem32’:
    ../src/mesa/util/u_debug.h:187:94: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
      187 | #define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
          |                                                                                              ^~~~~~~~~~~~
    ../src/mesa/util/u_debug.h:197:22: note: in expansion of macro ‘debug_assert’
      197 | #define assert(expr) debug_assert(expr)
          |                      ^~~~~~~~~~~~
    ../src/mesa/util/fast_urem_by_const.h:71:4: note: in expansion of macro ‘assert’
       71 |    assert(result == n % d);
          |    ^~~~~~
    
    Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Part-of: <!1030>
    61d888ec