bug-ddrescue
[Top][All Lists]
Advanced

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

Re: [Bug-ddrescue] [PATCH 3/5] io: Add missing prototype


From: Antonio Diaz Diaz
Subject: Re: [Bug-ddrescue] [PATCH 3/5] io: Add missing prototype
Date: Mon, 05 Aug 2019 18:52:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Rosen Penev wrote:
Found with -Wmissing-prototypes
--- a/io.cc
+++ b/io.cc
@@ -34,6 +34,7 @@ namespace {

  int volatile signum_ = 0;             // user pressed Ctrl-C or similar

+extern "C" void sighandler( int signum );
  extern "C" void sighandler( int signum )
    { if( signum_ == 0&&  signum>  0 ) signum_ = signum; }

There is nothing missing here. A function definition is a function declaration in which the body of the function is presented. Therefore there is no need to declare the function twice.

I would report this unneeded addition of a prototype as a bug to the compiler developers.



reply via email to

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