Bug #379
closedProblematic Warnings (gcc 4.4.5)
100%
Description
reported on gcc 4.4.5 / Ubuntu 10.30 Linux during the cross platform testing phase
c++ -DHAVE_CONFIG_H -DUSE_NULL_SAFE_OFSTRING -DNDEBUG -c -I. -I. - I../include -I../../config/include -I../../dcmnet/include - I../../dcmdata/include -I../../ofstd/include -I../../oflog/include \ -O -I/usr/include/libxml2 -D_REENTRANT - D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT - D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall dcmqrcnf.cc dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readConfigLines(FILE*)’: dcmqrcnf.cc:242: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readHostTable(FILE*, int*)’: dcmqrcnf.cc:364: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readVendorTable(FILE*, int*)’: dcmqrcnf.cc:420: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readAETable(FILE*, int*)’: dcmqrcnf.cc:476: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result c++ -DHAVE_CONFIG_H -DUSE_NULL_SAFE_OFSTRING -DNDEBUG -c -I. -I. - I../include -I../../config/include -I../../dcmnet/include - I../../dcmdata/include -I../../ofstd/include -I../../oflog/include \ -O -I/usr/include/libxml2 -D_REENTRANT - D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT - D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall dcmqrdbi.cc dcmqrdbi.cc: In member function ‘OFCondition DcmQueryRetrieveIndexDatabaseHandle::instanceReviewed(int)’: dcmqrdbi.cc:3382: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result
There are also similar reports for the non-public module (e.g. 'dcmprint')
Updated by Andrew Chiw over 12 years ago
Possibly problematic warnings (gcc 4.4.5)
Description
reported on gcc 4.4.5 / Ubuntu 10.30 Linux during the cross platform testing phase
c++ -DHAVE_CONFIG_H -DUSE_NULL_SAFE_OFSTRING -DNDEBUG -c -I. -I. - I../include -I../../config/include -I../../dcmnet/include - I../../dcmdata/include -I../../ofstd/include -I../../oflog/include \ -O -I/usr/include/libxml2 -D_REENTRANT - D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT - D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall dcmqrcnf.cc dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readConfigLines(FILE*)’: dcmqrcnf.cc:242: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readHostTable(FILE*, int*)’: dcmqrcnf.cc:364: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readVendorTable(FILE*, int*)’: dcmqrcnf.cc:420: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result dcmqrcnf.cc: In member function ‘int DcmQueryRetrieveConfig::readAETable(FILE*, int*)’: dcmqrcnf.cc:476: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result c++ -DHAVE_CONFIG_H -DUSE_NULL_SAFE_OFSTRING -DNDEBUG -c -I. -I. - I../include -I../../config/include -I../../dcmnet/include - I../../dcmdata/include -I../../ofstd/include -I../../oflog/include \ -O -I/usr/include/libxml2 -D_REENTRANT - D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT - D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall dcmqrdbi.cc dcmqrdbi.cc: In member function ‘OFCondition DcmQueryRetrieveIndexDatabaseHandle::instanceReviewed(int)’: dcmqrdbi.cc:3382: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result
There are also similar reports for the non-public module (e.g. 'dcmprint')
Updated by Andrew Chiw over 12 years ago
- Subject changed from Möglicherweise problematische Warnings (gcc 4.4.5) to Problematic Warnings (gcc 4.4.5)
Updated by Marco Eichelberg almost 9 years ago
- Status changed from New to Closed
The warnings have apparently been fixed by some commit meanwhile, as they do not occur anymore (tested commit 30a9cae with gcc 4.4.5 and -Wall).
Updated by Jörg Riesmeier almost 9 years ago
- Target version set to 3.6.2
- Category set to Library
- Status changed from Closed to Reopened
No, unfortunately, they are not fixed. It seems that the gcc on your system (caesar) is not built with the same configuration options as on the system that has been used by the reporter of this bug (me). Maybe, calling gcc with Option -Wunused-result helps :)
PS: -Wall does not enable all warnings.
Updated by Marco Eichelberg almost 9 years ago
- Assignee changed from Marco Eichelberg to Jörg Riesmeier
Updated by Jörg Riesmeier almost 9 years ago
- Status changed from Reopened to Closed
- % Done changed from 0 to 100
- Operating System set to Linux
- Compiler set to gcc
Finally closed. See commit e598abe and 5b95b6e.