Mailinglist Archive: opensuse-buildservice (233 mails)

< Previous Next >
Re: [opensuse-buildservice] no-return-in-nonvoid-function not always true
  • From: Wolfgang Rosenauer <wolfgang@xxxxxxxxxxxxx>
  • Date: Thu, 18 Dec 2008 08:52:58 +0100
  • Message-id: <494A015A.30307@xxxxxxxxxxxxx>
Hi,

Werner Hoch schrieb:
Hi there,

the error message of rpmlint no-return-in-nonvoid-function sometimes
detects code snippets that looks ok to me.

The code snippets moslty looks like this:
------
int func(int i)
{
switch(i) {
case 1: return 4;
case 2: return 5;
}
/* no return after switch statement */
}

Hmm, that's not quite ok IMHO.
What happens if i is not 1 or 2? You return random data, don't you?

What's the "right" solution to resolve those rpmlint errors?
* fixing all that errors?
* upstream reporting?

The right solution is to get them fixed either by reporting upstream or
doing yourself and upstreaming then ;-)
To get packages you probably can ignore them by rpmlint magic short term.

Wolfgang
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References