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

Brian Paul brianp at vmware.com
Fri Nov 17 16:23:46 UTC 2017


On 11/17/2017 04:03 AM, Gert Wollny wrote:
> Hello Brian and Emil,
>
> considering Emils comments on the patches 17 and 29 I'd suggest to drop
> these two from the series.
>
> Regarding 29 (-Wmissing-field-initializers) I have to admit I'm not
> sure how to silence this in a save way other then really initializing
> all members.
>
> For 17 I'll take another look to see what are the re-percussions of
> changing the type of buffer->Visual.samples to GLuint in the structure.
>
> Should I re-submit the remaining patches as a new series or would/could
> one of you push them as they are?

I can push the series, minus 17 and 29.

-Brian

>
> many thanks,
> Gert
>
> Am Donnerstag, den 16.11.2017, 16:09 +0100 schrieb Gert Wollny:
>> Dear all,
>>
>> I've cleaned up the patch according to Brian's and Emil's pointers.
>>
>> I tried to keep close to the original formatting, unless the original
>> lines
>> were overly long (+90 chars on a line). I think keeping the 78
>> columns limit
>> like suggested by Brian makes the code look a bit too ugly at some
>> points
>> and reformatting the long lines that are not touched with the patches
>> should
>> probably go into a separate patch set.
>>
>> To silence -Wunused-param three approaches are used where applicable:
>>
>>    UNUSED - the param is never used when the function is actually
>> compiled
>>
>>    MAYBE_UNUSED - the param is used in an 'assert' or a similar
>> construct that
>>       changes the usage pattern based on the compile time
>> options/defines
>>
>>    "(void)param;" in the body of the function if an #ifdef clause uses
>> param in
>>       one branch but not the other.
>>
>> Changes in v2:
>> - Move UNUSED and MAYBE_UNUSED to the beginning of the parameter
>> declarations-
>> - While the first series only addressed a release build, this series
>> also
>>    addresses the build with --enable-debug, hence five patches were
>> added.
>> - Also correct u_format_table.py to write out the functions with the
>> according
>>    UNUSED decoration.
>> - additionally -Wmissing-field-initialzers warnings were addressed.
>>
>> Best,
>> Gert
>>
>> PS: I don't have git write access.
>>
>> Gert Wollny (29):
>>    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.
>>    gallium/aux/util/u_format_table.py: Add UNUSED decoration to the
>>      generated function headers
>>    gallium/aux/util/u_debug.c: Silence warnings -Wunused-param
>>    gallium/aux/util/u_debug_flush.c: Silence warnings -Wunused-param
>>    gallium/aux/util/u_debug_image.c: Silence warnings -Wunused-param
>>    gallium/aux/util/u_surface.c: Silence warnings and remove unneeded
>>      MAYBE_UNUSED
>>    gallium/aux/util/u_tests.c: Fix warnigns triggered -Wuninitialized
>>
>>   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.c            |  35 ++--
>>   src/gallium/auxiliary/util/u_debug_describe.c   |   2 +-
>>   src/gallium/auxiliary/util/u_debug_flush.c      |   7 +-
>>   src/gallium/auxiliary/util/u_debug_image.c      |   4 +-
>>   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_pack.py     |   2 +-
>>   src/gallium/auxiliary/util/u_format_rgtc.c      |  68 ++++---
>>   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          |  12 +-
>>   src/gallium/auxiliary/util/u_tests.c            |   9 +-
>>   src/gallium/auxiliary/util/u_threaded_context.c |  21 ++-
>>   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 +-
>>   28 files changed, 281 insertions(+), 245 deletions(-)
>>
>



More information about the mesa-dev mailing list