Modify

Opened 8 years ago

Closed 8 years ago

#3507 closed Bugs (fixed)

Patch to not to ignore fread and fseek return value

Reported by: mloskot <mateusz@…> Owned by: johnmaddock
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@…> 8 years ago.
Patch with fread and fseek return value checks in regex library

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by mloskot <mateusz@…>

Patch with fread and fseek return value checks in regex library

comment:1 Changed 8 years ago by mloskot <mateusz@…>

I've forgotten to add environment details:

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

comment:2 Changed 8 years ago by johnmaddock

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in Trunk. Thanks, John.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain johnmaddock.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.