bugFreeciv - Bugs: bug #20632, lua-5.2 compiler warnings...

Show feedback again

bug #20632: lua-5.2 compiler warnings (ignoring return value of 'fwrite')

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Tue Mar 19 09:25:37 2013  
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Wont Fix
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.5.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sun Jan 4 07:04:41 2015, comment #9:

1) It doesn't give warnings with any sufficiently recent version of gcc
2) It's only a warning even with older gcc
3) It's 3rd party library, not our own code
4) Freeciv-2.6 will be using lua-5.3, so any fix would benefit 2.5 only

-> WontFix

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu Jul 18 17:20:23 2013, comment #8:

I just updated gcc from 4.6.3 -> 4.6.4 and warnings dissapeared,
seems all gcc below 4.6.4 throws that warning.

mir3x <mir3x>
Project Member
Tue Jul 9 19:26:38 2013, comment #7:

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.3-4' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.3 (Debian 4.7.3-4)

But at least /usr/include/stdio.h comes from libc, not gcc. My libc is eglibc-2.17-7.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Jul 9 19:16:39 2013, comment #6:

Can someone, who DON'T get those warnings post gcc -v ?
I tested on gcc 4.4 and 4.6, but on both I get the same warnings.

my gcc -v looks:

Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python --enable-checking=release --disable-libgcj --enable-libstdcxx-time --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.6, pie-0.5.2'
Thread model: posix
gcc version 4.6.3 (Gentoo 4.6.3 p1.6, pie-0.5.2)

mir3x <mir3x>
Project Member
Sat Jun 15 19:23:07 2013, comment #5:

VargaD on IRC (who's run into this) suggests that we could not propagate -Werror when building our dependencies.

Jacob Nevins <jtn>
Project Administrator
Sat Jun 1 12:35:14 2013, comment #4:

you can ignore comment #2 and comment #3. I had an error in my script to create the tarball for 2.4.0-beta. It contained the trunk version of freeciv. Thus, this bug report is still only for trunk.

Matthias Pfafferodt <syntron>
Project Member
Sat Jun 1 10:12:21 2013, comment #3:

> What gcc version is that? Have you explicitly set some CFLAGS or CPPFLAGS?

The spec file did not change between S2_4 and 2.4.0-beta1. S2_4 can be build as is but 2.4.0-beta1 shows the error. No special settings are used. The spec files are visible in the opensuse build service.

Matthias Pfafferodt <syntron>
Project Member
Sat Jun 1 10:09:46 2013, comment #2:

This bug is also valid for 2.4.0-beta1; I have activated system lua for opensuse >= 12.2 and disable building of 2.4.0-beta1 for opensuse 12.1 there it lua 5.2 is not available.

see: https://build.opensuse.org/project/monitor?project=home%3Asyntron%3Afreeciv

Matthias Pfafferodt <syntron>
Project Member
Sat Apr 6 23:48:16 2013, comment #1:

Also encountered by syntron on OpenSUSE: bug #20717.

Jacob Nevins <jtn>
Project Administrator
Tue Mar 19 09:25:37 2013, original submission:

From patch #3782 by mir3x <mir3x>:

> btw. I couldnt test debug version cause, there are some warnings
> in newest trunk ( treated as errors ):
> lbaselib.c: In function 'luaB_print':
> lbaselib.c:37:14: error: ignoring return value of 'fwrite',
> declared with attribute warn_unused_result [-Werror=unused-result]

What gcc version is that? Have you explicitly set some CFLAGS or CPPFLAGS?

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mir3x (Posted a comment)
  • -unavailable- added by syntron (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by jtn
  • -unavailable- added by cazfi (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Jan 4 07:05:02 2015cazfiOpen/ClosedOpen=>Closed
    Sun Jan 4 07:04:41 2015cazfiCategoryNone=>general
      StatusNone=>Wont Fix
      Assigned toNone=>cazfi
    Sat Apr 6 23:48:16 2013jtnPlanned Release=>2.5.0
      Summarylua-5.2 compiler warnings=>lua-5.2 compiler warnings (ignoring return value of 'fwrite')
      Carbon-Copy-=>Added mir3x
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup