GNOME Bugzilla – Bug 777692
Drop gnome-common dependency
Last modified: 2021-05-17 16:09:07 UTC
Use AX_COMPILER_FLAGS and friends instead, this requires a number of warnings to be fixed https://wiki.gnome.org/Projects/GnomeCommon/Migration
Created attachment 344110 [details] [review] Remove shadow variables Prefix global variables with sj_ to avoid local variables shadowing them. Found with -Wshadow
Created attachment 344111 [details] [review] Constify string literals Ensure string literals are declared const to prevent warnings from -Wwrite-strings.
Created attachment 344112 [details] [review] Add SJ_BEGIN/END_IGNORE_DISCARDED_QUANTIFIERS These make it simple to turn -Wdiscarded-quantifiers warnings created by -Wwrite-strings off.
Created attachment 344113 [details] [review] Fix -Wdiscarded-quantifiers warnings -Wwrite-strings causes a couple of -Wdiscarded-quantifier warnings that while technically correct are really false positives as the strings are never modified.
Created attachment 344114 [details] [review] Fix -Wswitch-default warnings Add a default clause to switch statements that are missing one.
Created attachment 344115 [details] [review] Add SJ_BEGIN/END_IGNORE_SWITCH_ENUM These provide a simple way to disable -Wswitch-enum warnings where they are unhelpful.
Created attachment 344116 [details] [review] Fix -Wswitch-enum warnings Wrap switch statements in SJ_BEGIN/END_IGNORE_SWITCH_ENUM where the warning is not useful (i.e. in switch statements that are only interested in a subset of enum values)
Created attachment 344117 [details] [review] Remove sj-main.h The only prototype used outside sj-main.c which is not already in sound-juicer.h is set_action_enabled() which has been added to that header.
Created attachment 344118 [details] [review] Fix old style function definitions Make sure void functions have the prototype f(void) rather than f().
Created attachment 344119 [details] [review] Remove duplicate declarations Make sure functions and variables are only declared once.
Created attachment 344120 [details] [review] Do not mix code and declarations Make sure all variables are declared at the start of each block.
Created attachment 344121 [details] [review] Drop gnome-common dependency Use our own autogen.sh and the appropriate autoconf archive macros instead¹. Using AX_COMPILER_FLAGS turns on several new sets of compile warnings and means -Werror is on by default in non release builds. ¹ https://wiki.gnome.org/Projects/GnomeCommon/Migration
Created attachment 345189 [details] [review] Remove shadow variables Prefix global variables with sj_ to avoid local variables shadowing them. Found with -Wshadow
Created attachment 345190 [details] [review] Constify string literals Ensure string literals are declared const to prevent warnings from -Wwrite-strings.
Created attachment 345191 [details] [review] Add SJ_BEGIN/END_IGNORE_DISCARDED_QUANTIFIERS These make it simple to turn -Wdiscarded-quantifiers warnings created by -Wwrite-strings off. As clang uses -Wincompatible-pointer-types-discards-qualifiers instead we have to check which compiler is being used.
Created attachment 345192 [details] [review] Fix -Wdiscarded-quantifiers warnings -Wwrite-strings causes a couple of -Wdiscarded-quantifier warnings that while technically correct are really false positives as the strings are never modified.
Created attachment 345193 [details] [review] Fix -Wswitch-default warnings Add a default clause to switch statements that are missing one.
Created attachment 345194 [details] [review] Add SJ_BEGIN/END_IGNORE_SWITCH_ENUM These provide a simple way to disable -Wswitch-enum warnings where they are unhelpful. https://bugzilla.gnome.org/show_bug.cgi?id=777692 squash! Add SJ_BEGIN/END_IGNORE_SWITCH_ENUM
Created attachment 345195 [details] [review] Fix -Wswitch-enum warnings Wrap switch statements in SJ_BEGIN/END_IGNORE_SWITCH_ENUM where the warning is not useful (i.e. in switch statements that are only interested in a subset of enum values)
Created attachment 345196 [details] [review] Silence -Wsometimes-uninitialized track_offset is not actually used uninitialized but clang cannot deduce that so gives a false warning.
Created attachment 345197 [details] [review] Fix -Wsign-compare warning max_realfile needs to be an int as it’s passed to printf to control the field width but strlen returns size_t. The casts are a bit ugly but the strings are filenames so shouldn’t overflow an int.
Created attachment 345198 [details] [review] Fix -Wsuggest-attribute warnings Add a couple of function attributes suggested by the compiler.
Created attachment 345199 [details] [review] Remove sj-main.h The only prototype used outside sj-main.c which is not already in sound-juicer.h is set_action_enabled() which has been added to that header.
Created attachment 345200 [details] [review] Fix old style function definitions Make sure void functions have the prototype f(void) rather than f().
Created attachment 345201 [details] [review] Remove duplicate declarations Make sure functions and variables are only declared once.
Created attachment 345202 [details] [review] Do not mix code and declarations Make sure all variables are declared at the start of each block.
Created attachment 345203 [details] [review] Drop gnome-common dependency Use our own autogen.sh and the appropriate autoconf archive macros instead¹. Using AX_COMPILER_FLAGS turns on several new sets of compile warnings and means -Werror is on by default in non release builds. ¹ https://wiki.gnome.org/Projects/GnomeCommon/Migration
Attachment 345189 [details] pushed as ddb60b2 - Remove shadow variables Attachment 345190 [details] pushed as 6743985 - Constify string literals Attachment 345191 [details] pushed as e38111d - Add SJ_BEGIN/END_IGNORE_DISCARDED_QUANTIFIERS Attachment 345192 [details] pushed as 78a62d7 - Fix -Wdiscarded-quantifiers warnings Attachment 345193 [details] pushed as 05e6fa1 - Fix -Wswitch-default warnings Attachment 345194 [details] pushed as 96f8999 - Add SJ_BEGIN/END_IGNORE_SWITCH_ENUM Attachment 345195 [details] pushed as 2b806cc - Fix -Wswitch-enum warnings Attachment 345199 [details] pushed as e4848b6 - Remove sj-main.h Attachment 345200 [details] pushed as e119157 - Fix old style function definitions Attachment 345201 [details] pushed as b3c9a88 - Remove duplicate declarations Attachment 345202 [details] pushed as ac33bfb - Do not mix code and declarations Attachment 345203 [details] pushed as 1d3a25a - Drop gnome-common dependency
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/sound-juicer/-/issues/176.