public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32185]  New: unused result warnings and -werror
@ 2007-06-02  3:13 robert at linuxfromscratch dot org
  2007-06-02  3:15 ` [Bug c/32185] " robert at linuxfromscratch dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: robert at linuxfromscratch dot org @ 2007-06-02  3:13 UTC (permalink / raw)
  To: gcc-bugs

When building GCC with -D_FORTIFY_SOURCE we get some warnings which will cause
--enable-werror builds to die. I'm attaching a small patch.


-- 
           Summary: unused result warnings and -werror
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: robert at linuxfromscratch dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c/32185] unused result warnings and -werror
  2007-06-02  3:13 [Bug c/32185] New: unused result warnings and -werror robert at linuxfromscratch dot org
@ 2007-06-02  3:15 ` robert at linuxfromscratch dot org
  2007-06-02  6:16 ` [Bug other/32185] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: robert at linuxfromscratch dot org @ 2007-06-02  3:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from robert at linuxfromscratch dot org  2007-06-02 03:14 -------
Created an attachment (id=13651)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13651&action=view)
Patch for fwrite() and getcwd() unused result warnings


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug other/32185] unused result warnings and -werror
  2007-06-02  3:13 [Bug c/32185] New: unused result warnings and -werror robert at linuxfromscratch dot org
  2007-06-02  3:15 ` [Bug c/32185] " robert at linuxfromscratch dot org
@ 2007-06-02  6:16 ` pinskia at gcc dot gnu dot org
  2007-06-03  0:50 ` robert at linuxfromscratch dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-02  6:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-06-02 06:16 -------
First you should be using the trunk to create patches.
Second we do check later on if there was an error on the write so I think glibc
is wrong in warning about this case.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |other


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug other/32185] unused result warnings and -werror
  2007-06-02  3:13 [Bug c/32185] New: unused result warnings and -werror robert at linuxfromscratch dot org
  2007-06-02  3:15 ` [Bug c/32185] " robert at linuxfromscratch dot org
  2007-06-02  6:16 ` [Bug other/32185] " pinskia at gcc dot gnu dot org
@ 2007-06-03  0:50 ` robert at linuxfromscratch dot org
  2007-06-03  2:00 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: robert at linuxfromscratch dot org @ 2007-06-03  0:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from robert at linuxfromscratch dot org  2007-06-03 00:50 -------
I checked whether it was fixed in trunk, but you're right I should have made a
patch that applies to trunk. Glibc is giving a false positive here, but the
programmer and compiler are the only ones able to know. Could the check in the
code be moved futher up so the compiler can see that the checking is being
done?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug other/32185] unused result warnings and -werror
  2007-06-02  3:13 [Bug c/32185] New: unused result warnings and -werror robert at linuxfromscratch dot org
                   ` (2 preceding siblings ...)
  2007-06-03  0:50 ` robert at linuxfromscratch dot org
@ 2007-06-03  2:00 ` pinskia at gcc dot gnu dot org
  2010-02-20 23:47 ` manu at gcc dot gnu dot org
  2010-07-06 17:39 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-03  2:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-06-03 02:00 -------
>Could the check in the code be moved futher up so the compiler can see that the
> checking is being done?

Not if glibc is marking the functions as warn_unused_result.  Also the
front-end would need some flow analysis to figure out if a warning is needed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug other/32185] unused result warnings and -werror
  2007-06-02  3:13 [Bug c/32185] New: unused result warnings and -werror robert at linuxfromscratch dot org
                   ` (3 preceding siblings ...)
  2007-06-03  2:00 ` pinskia at gcc dot gnu dot org
@ 2010-02-20 23:47 ` manu at gcc dot gnu dot org
  2010-07-06 17:39 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-20 23:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from manu at gcc dot gnu dot org  2010-02-20 23:47 -------
Is this stil valid? Patches go to gcc-patches, see also 

http://gcc.gnu.org/contribute.html


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug other/32185] unused result warnings and -werror
  2007-06-02  3:13 [Bug c/32185] New: unused result warnings and -werror robert at linuxfromscratch dot org
                   ` (4 preceding siblings ...)
  2010-02-20 23:47 ` manu at gcc dot gnu dot org
@ 2010-07-06 17:39 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-07-06 17:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from manu at gcc dot gnu dot org  2010-07-06 17:39 -------
No duplicates in 3 years, no new feedback, closing this. Please reopen if
necessary.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug other/32185] unused result warnings and -werror
       [not found] <bug-32185-4@http.gcc.gnu.org/bugzilla/>
@ 2013-05-04 21:01 ` paulo@matos-sorge.com
  0 siblings, 0 replies; 8+ messages in thread
From: paulo@matos-sorge.com @ 2013-05-04 21:01 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185

Paulo J. Matos <paulo@matos-sorge.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paulo@matos-sorge.com

--- Comment #7 from Paulo J. Matos <paulo@matos-sorge.com> 2013-05-04 21:01:22 UTC ---
This still occurs with HEAD of gcc in the call to getcwd in server.c if you
build with --enable-werror-always. It's not high priority but it would be nice
to see this warning gone (via checking within gcc).


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-04 21:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-02  3:13 [Bug c/32185] New: unused result warnings and -werror robert at linuxfromscratch dot org
2007-06-02  3:15 ` [Bug c/32185] " robert at linuxfromscratch dot org
2007-06-02  6:16 ` [Bug other/32185] " pinskia at gcc dot gnu dot org
2007-06-03  0:50 ` robert at linuxfromscratch dot org
2007-06-03  2:00 ` pinskia at gcc dot gnu dot org
2010-02-20 23:47 ` manu at gcc dot gnu dot org
2010-07-06 17:39 ` manu at gcc dot gnu dot org
     [not found] <bug-32185-4@http.gcc.gnu.org/bugzilla/>
2013-05-04 21:01 ` paulo@matos-sorge.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).