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

Bug#526620: marked as done (False positive from -Wreturn-type)



Your message dated Sun, 05 Jul 2015 16:18:22 +0000
with message-id <E1ZBmcY-0006gk-9d@franck.debian.org>
and subject line Bug#707276: Removed package(s) from unstable
has caused the Debian Bug report #526620,
regarding False positive from -Wreturn-type
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
526620: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526620
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-4.4
Version: 4.4.0-1

I have the following code:

static void *queue_thread(void attribute((unused)) *arg) {
  struct packet *p;

  for(;;) {
    /* Get the next packet */
    pthread_mutex_lock(&receive_lock);
    while(!received_packets) {
      pthread_cond_wait(&receive_cond, &receive_lock);
    }
    p = received_packets;
    received_packets = p->next;
    if(!received_packets)
      received_tail = &received_packets;
    --nreceived;
    pthread_mutex_unlock(&receive_lock);
    /* Add it to the heap */
    pthread_mutex_lock(&lock);
    pheap_insert(&packets, p);
    nsamples += p->nsamples;
    pthread_cond_broadcast(&cond);
    pthread_mutex_unlock(&lock);
  }
}

This function's return type is required to be 'void *' because it is passed to pthread_create(); but it never actually returns. However, gcc-4.4 -Wall generates the following warning for it:

playrtp.c: In function ‘queue_thread’:
playrtp.c:327: error: no return statement in function returning non-void

(It's shown here as an error since I always use -Werror, because many warnings actually indicate problems that really must be fixed.)

GCC 4.3 generates no such warning.

The underlying warning is -Wreturn-type, which is enabled by -Wall. The documentation for this function hasn't changed since GCC 4.3 as far as I can see but evidently the behavior has - it now has a false positive which it previously did not.

I'd rather not just disable the warning from configure since it also can detect real errors.

ttfn/rjk




--- End Message ---
--- Begin Message ---
Version: 1:4.4.7-8+rm

Dear submitter,

as the package gcc-4.4 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/707276

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Luca Falavigna (the ftpmaster behind the curtain)

--- End Message ---

Reply to: