commit 5fe71b665807c077190490ad4f1dc2404ab2bb68
parent fa34465dcef8d9590594058747887ba34378b462
Author: Morel Bérenger <berengermorel76@gmail.com>
Date: Sat, 19 Sep 2020 21:59:54 +0200
some warning fixups
Diffstat:
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/README b/README
@@ -37,8 +37,6 @@ It should be compatible with any compiler supporting C99 or
more recent, and compile with almost no warnings.
Known warnings:
-* implicit-fallthrough (gcc)
-* missing-noreturn (clang)
* padded (clang)
Examples of build line:
diff --git a/src/main.c b/src/main.c
@@ -39,7 +39,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <SDL/SDL.h>
-void usage_and_quit( int argc, char** argv );
+void usage_and_quit( int argc, char** argv ) __attribute__ ((noreturn));
void shmem_deinit( void );
uint16_t get_u16( int argc, char** argv, char const* const str, char const* const label );
@@ -150,10 +150,10 @@ int main(int argc, char *argv[])
break;
case 8:
fprintf( stdout, "Using 256 colors\n" );
- //pass through
+ /* fall through */
case 16:
fprintf( stdout, "Using 65536 colors\n" );
- //pass through
+ /* fall through */
default:
fprintf( stderr, "Using bpp=%d is not supported (yet?).\n", bpp );
exit( EXIT_FAILURE );