Bug 7104 - strtol result is not always needed.
Summary: strtol result is not always needed.
Status: RESOLVED WONTFIX
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.8
: P3 minor
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-18 07:16 UTC by Daniel Smith
Modified: 2014-07-02 07:50 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Smith 2008-12-18 07:16:35 UTC
Version: 2.8~20080505-0ubuntu7

warning: ignoring return value of 'strtol', declared with attribute
warn_unused_result

strtol has useful side-effects that do not require examination of the result. 
For example, (void)strtol(string,&string,0) will skip an unneeded number in string.

Suggest warn_unused_result is not applied to strtol and family.
Comment 1 Ulrich Drepper 2008-12-25 18:11:08 UTC
There are always idiotic code sequences.  For those case work around the warning.