From 7dc4d28ce8a68c40e018345b0d0a0e215d5e0da7 Mon Sep 17 00:00:00 2001 From: Vasiliy Faronov Date: Tue, 25 Apr 2017 10:52:46 +0300 Subject: [PATCH 1/2] Update obsolete references to GLib 2.27/28 in HACKING Fixes #1476. --- HACKING | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HACKING b/HACKING index 030b20680f..0b27c05fd2 100644 --- a/HACKING +++ b/HACKING @@ -176,7 +176,7 @@ libs (including GLib, GDK and Pango) has the advantages that you don't get confused by any newer API additions and you don't have to take care about whether you can use them or not. -You might want to pass the ``-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_28`` C +You might want to pass the ``-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32`` C preprocessor flag to get warnings about newer symbols from the GLib. On the contrary, you might also want to get deprecation warnings for symbols @@ -196,7 +196,7 @@ Coding them down into smaller static functions where possible. This makes code much easier to read and maintain. * Use GLib types and functions - gint not int, g_free() not free(). -* Your code should build against GLib 2.27.3 and GTK 2.24. At least for the +* Your code should build against GLib 2.32 and GTK 2.24. At least for the moment, we want to keep the minimum requirement for GTK at 2.24 (of course, you can use the GTK_CHECK_VERSION macro to protect code using later versions). From e079a5e497acfc6354626de3771078bf9ce90a46 Mon Sep 17 00:00:00 2001 From: Vasiliy Faronov Date: Tue, 25 Apr 2017 10:54:22 +0300 Subject: [PATCH 2/2] Replace obsolete gcc -W option with -Wextra in HACKING According to gcc --help=warnings, -W is a deprecated option and -Wextra should be used instead. --- HACKING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HACKING b/HACKING index 0b27c05fd2..f1106c14dc 100644 --- a/HACKING +++ b/HACKING @@ -212,7 +212,7 @@ Compiler options & warnings Use ``CFLAGS='-Wfoo' ./configure`` or ``CFLAGS='-Wfoo' ./autogen.sh`` to set warning options (as well as anything else e.g. -g -O2). -* Enable warnings - for gcc use '-Wall -W' (and optionally +* Enable warnings - for gcc use '-Wall -Wextra' (and optionally -Wno-unused-parameter to avoid unused parameter warnings in Glade callbacks). * You should try to write ISO C99 code for portability, so always