[Mesa-dev] [PATCH 00/23] Silence some warnings that show up when compiling gallium/aux/util

Gert Wollny gw.fossdev at gmail.com
Sun Nov 12 13:55:32 UTC 2017


Hello all, 

this might be a bit over-zealos, but I usually prefer to compile with 
-Wall -Wextra, and with mesa this gives many warnings. This series 
silences most of the warnings that are issued when compiling the 
C files in gallium/aux/util. 

Most fixes relate to -Wunused-param and are silenced by simply decorating 
the according parameters with "UNUSED" or "MAYBE_UNUSED" and disabling this
 warning would probably be of no consequence, but some other warnings might 
actually point to possible bugs (e.g. -Wunused-result, patch 3 
and -Wsign-compare patch 4).

many thanks for any comments and best regards, 
Gert 

--
Submitter has no write access to mesa git. 

Gert Wollny (23):
  gallium/aux/util/u_blitter.c: Silence some warnings
  gallium/aux/util/u_debug_describe.c: Silence an -Wunused-param warning
  gallium/aux/util/u_debug_stack.c: Silence -Wunused-result warning
  gallium/aux/util/u_dump_defines.c: Fix -Wcompare-unsigned warning
  gallium/aux/util/u_dump_state.c: Fix two -Wunused-paramter warnings
  gallium/aux/util/u_format.c: Fix one -Wunused-param warning
  gallium/aux/util/u_format_etc.c: Fix eight -Wunused-param warnings
  gallium/aux/util/u_format_latc.c: Fix various -Wunused-param warnings,
  gallium/aux/util/u_format_other.c: Fix various -Wunused-param
    warnings.
  gallium/aux/util/u_format_rgtc.c: Fix a number of -Wunused-param
    warnings
  gallium/aux/util/u_format_yuv.c: Fix a number of -Wunused-param
    warnings.
  gallium/aux/util/u_mm.c: Fix one -Wparam-unused warning.
  gallium/aux/util/u_pstipple.c: Fix one -Wsign-compare warning in ?:
    construct.
  gallium/aux/util/u_surface.c: Silence a -Wsign-compare warning.
  gallium/aux/util/u_threaded_context.c: Fix some -Wunused-param
    warnings.
  gallium/aux/util/u_transfer.c: Fix some -Wunused-param warnings.
  mesa/main/framebuffer.h: Fix one -Wsign-compare warning in ?:
    construct.
  mesa/main/texcompress_s3tc_tmp.h: Fix two -Wparam-unused warnings.
  src/util/simple_mtx.h: Fix two -Wunused-param warnings.
  gallium/aux/util/u_blit.c: Fix -Wunused-param warnings
  gallium/aux/util/u_debug_refcnt.h: Fix -Wunused-param warnings
  gallium/aux/os/os_thread.h: Silence -Wunused-param.
  gallium/aux/util/u_async_debug.c: Fix -Wtype-limits warning.

 src/gallium/auxiliary/os/os_thread.h            |   2 +
 src/gallium/auxiliary/util/u_async_debug.c      |   2 +-
 src/gallium/auxiliary/util/u_blit.c             |   2 +-
 src/gallium/auxiliary/util/u_blitter.c          |  10 +-
 src/gallium/auxiliary/util/u_debug_describe.c   |   2 +-
 src/gallium/auxiliary/util/u_debug_refcnt.h     |   4 +-
 src/gallium/auxiliary/util/u_debug_stack.c      |   6 +-
 src/gallium/auxiliary/util/u_dump_defines.c     |   2 +-
 src/gallium/auxiliary/util/u_dump_state.c       |   4 +-
 src/gallium/auxiliary/util/u_format.c           |   2 +
 src/gallium/auxiliary/util/u_format_etc.c       |   8 +-
 src/gallium/auxiliary/util/u_format_latc.c      |  24 ++-
 src/gallium/auxiliary/util/u_format_other.c     |  34 ++--
 src/gallium/auxiliary/util/u_format_rgtc.c      |  26 ++-
 src/gallium/auxiliary/util/u_format_yuv.c       | 232 ++++++++++++------------
 src/gallium/auxiliary/util/u_mm.c               |   2 +-
 src/gallium/auxiliary/util/u_pstipple.c         |   2 +-
 src/gallium/auxiliary/util/u_surface.c          |   2 +-
 src/gallium/auxiliary/util/u_threaded_context.c |  19 +-
 src/gallium/auxiliary/util/u_transfer.c         |  20 +-
 src/mesa/main/framebuffer.h                     |   2 +-
 src/mesa/main/texcompress_s3tc_tmp.h            |   4 +-
 src/util/simple_mtx.h                           |   4 +-
 23 files changed, 222 insertions(+), 193 deletions(-)

-- 
2.13.6



More information about the mesa-dev mailing list