Merge lp:~widelands-dev/widelands/gettext-compile-errors into lp:widelands

Proposed by Tino
Status: Merged
Merged at revision: 8167
Proposed branch: lp:~widelands-dev/widelands/gettext-compile-errors
Merge into: lp:widelands
Diff against target: 21 lines (+5/-6)
1 file modified
src/third_party/gettext/gettext.h (+5/-6)
To merge this branch: bzr merge lp:~widelands-dev/widelands/gettext-compile-errors
Reviewer Review Type Date Requested Status
Klaus Halfmann compile Approve
SirVer Pending
Review via email: mp+309638@code.launchpad.net

Commit message

Silence warnings about variable length arrays in gettext.h

Description of the change

Silence warnings about variable length arrays in gettext.h

To post a comment you must log in.
Revision history for this message
Tino (tino79) wrote :

Ok, let's wait for feedback on MacOS and Appveyor.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 1537. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/171762218.
Appveyor build 1379. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_gettext_compile_errors-1379.

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

compiles on OSX based on MacPorts, did not check anything else, yet

Revision history for this message
GunChleoc (gunchleoc) wrote :

Did you get any compiler warnings about variable length arrays in gettext.h? If not, this branch is good to go.

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

I now checked the compiled output again and found no such warnings. Just got waring about enums/switches, and things like

gettext-compile-errors/src/logic/map_objects/tribes/building.cc:664:22: warning: format
specifies type 'void *' but the argument has type 'Widelands::Flag *' [-Wformat-pedantic]
 molog("flag: %p\n", flag_);

perhpas we shoud drop those via -Wformat-pedantic

and this one:
gettext-compile-errors/src/graphic/text/bidi.cc:513:20: warning: disabled expansion of
      recursive macro [-Wdisabled-macro-expansion]

will now play a bit....

review: Approve (compile)
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks, this makes this branch ready to merge.

The printf messages aren't that many and I'd like to keep them in, so we will get warnings about actual printf errors - those warnings have saved me from making errors many times.

@bunnybot merge

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Actually my wife crushed half an Empire, aehm Imperial AI, using this branch, so there should not be anything serious inside

Revision history for this message
GunChleoc (gunchleoc) wrote :

Good for her :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/third_party/gettext/gettext.h'
2--- src/third_party/gettext/gettext.h 2016-08-04 15:49:05 +0000
3+++ src/third_party/gettext/gettext.h 2016-10-30 12:39:29 +0000
4@@ -158,12 +158,11 @@
5
6 #include <string.h>
7
8-#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && \
9- !defined __STRICT_ANSI__) /* || __STDC_VERSION__ >= 199901L */)
10-#define GETTEXT_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
11-#else
12-#define GETTEXT_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
13-#endif
14+ /* http://bug-gnulib.gnu.narkive.com/1Hoiy7Iw/c-support
15+ GCC supports variable-size arrays in C and C++ mode.
16+ ISO C++ supports variable-size arrays, but some older PGI and Sun compilers
17+ don't. */
18+#define GETTEXT_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS !(__GNUC__ >= 3 || (defined __cplusplus && !(defined __PGI || defined __SUNPRO_CC)))
19
20 #if !GETTEXT_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
21 #include <stdlib.h>

Subscribers

People subscribed via source and target branches

to status/vote changes: