bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12017] New: Would like to disable compiler warning re use of tmp


From: om dot p dot sachan at intel dot com
Subject: [Bug ld/12017] New: Would like to disable compiler warning re use of tmpnam
Date: 14 Sep 2010 09:24:04 -0000

When building code that calls tmpnam, the compiler generates this warning:
"warning: the use of `tmpnam' is dangerous, better use `mkstemp'"

Unlike other compiler warnings this one does not have a number and so there 
appears to be no way to disable it. I'd really like to disable this warning as 
our goal is to have our code compiling warning free, and I get frequent 
questions about this warning from other developers.

For reference, we are explicitly calling this function precisely *because* it 
is unsafe. We have a library that we preload which wrappers calls to this 
function so we can trap any calls made to it and print out warnings to the 
user that it is being invoked before we call it. We do this with several 
unsafe calls that we want to avoid. Unfortunately this causes the compiler to 
generate the above warning from our code.

-- 
           Summary: Would like to disable compiler warning re use of tmpnam
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: om dot p dot sachan at intel dot com
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=12017

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]