[sword-devel] GCC warnings (was: Re: 1.6.1 outstanding items? )

Matthew Talbert ransom1982 at gmail.com
Thu Dec 3 22:22:07 MST 2009


> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -I../include
>  -I/usr/include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__
>  -DSWICU_DATA=\"/usr/lib/sword/1.6.0_icu_4.0.1\" -D_FTPLIB_NO_COMPAT
>  -D_ICU_ -g3 -O0 -Wall -Werror -D_ICU_ -ftemplate-depth-25
>  -DCURLAVAILABLE -I/usr/include -I/usr/lib64 -DUSELUCENE -g -O2 -g -Wall
>  -DUSBINARY -c ../src/mgr/filemgr.cpp  -fPIC -DPIC -o .libs/filemgr.o
> cc1plus: warnings being treated as errors
> ../src/mgr/filemgr.cpp: In member function ‘signed char
> sword::FileMgr::trunc(sword::FileDesc*)’:
>  ../src/mgr/filemgr.cpp:285: error: ignoring return value of ‘ssize_t
>  write(int, const void*, size_t)’, declared with attribute
>  warn_unused_result
>  ../src/mgr/filemgr.cpp: In static member function ‘static int
>  sword::FileMgr::copyFile(const char*, const char*)’:
>  ../src/mgr/filemgr.cpp:418: error: ignoring return value of ‘ssize_t
>  write(int, const void*, size_t)’, declared with attribute
>  warn_unused_result
> make[2]: *** [filemgr.lo] Error 1
>
> BOTTOM LINE: Compiling with -Wall -Werror means that we really do need
> to check the return values of write() calls... at least, I think that's
> what the issue is.
>

I just built on Jaunty, which has gcc 4.3.3. I built r2480, and it
compiled fine with -Wall and -Werror.

Matthew



More information about the sword-devel mailing list