Opened 13 years ago

Closed 13 years ago

#3507 closed Bugs (fixed)

Patch to not to ignore fread and fseek return value

Reported by: mloskot <mateusz@…> Owned by: John Maddock
Milestone: Boost 1.41.0 Component: regex
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

While building the Boost inspect tool from trunk (r56576) , I noticed two warnings from the Boost Regex library:

./../../libs/regex/src/../src/fileiter.cpp: In member function
 ‘void boost::re_detail::mapfile::lock(char**) const’:
../../../libs/regex/src/../src/fileiter.cpp:263: warning: ignoring
 return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, 
 declared with attribute warn_unused_result
../../../libs/regex/src/../src/fileiter.cpp:265: warning: ignoring
 return value of ‘size_t fread(void*, size_t, size_t, FILE*)’,
 declared with attribute warn_unused_result

Here is patch that does not ignore fread and fseek return values.

Attachments (1)

boost-regex-fread-return-check-r56576.patch (1.1 KB ) - added by mloskot <mateusz@…> 13 years ago.
Patch with fread and fseek return value checks in regex library

Download all attachments as: .zip

Change History (3)

by mloskot <mateusz@…>, 13 years ago

Patch with fread and fseek return value checks in regex library

comment:1 by mloskot <mateusz@…>, 13 years ago

I've forgotten to add environment details:

  • I'm using GCC 4.3.3 on Linux Ubuntu 9.04 (Intel 64-bit)

comment:2 by John Maddock, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in Trunk. Thanks, John.

Note: See TracTickets for help on using tickets.