[Nut-upsdev] Re: [nut-commits] svn commit r414 - in trunk: . drivers

Niels Baggesen nba-guest at costa.debian.org
Tue Apr 25 11:04:20 UTC 2006


On Tue, Apr 25, 2006 at 08:51:40AM +0200, Arjen de Korte wrote:
> > Log:
> > Fix C++ style declarations between statements
> 
> What is the reason for 'fixing' this? Constructions like these are used in
> many locations throughout the sources (not only in the drivers, but also
> in common and server). If there is a compelling reason to change this, we
> need to do this in other parts as well. That will be quite an effort I
> presume, so we should really consider if this is absolutely needed.
> Personally, I don't think it is a big issue, since we would have seen many
> more complaints about this.

There are no other instances like this.

Putting declarations between statements is not valid C.
There is a while block preceding the bad spot.

Changing it back as it was before, I get

hera:drivers> make
gcc -g -I../include -O -Wall -Wsign-compare  -c  cpsups.c
cpsups.c: In function `scan_poll_values':
cpsups.c:162: parse error before `char'
cpsups.c:165: `tmp1' undeclared (first use in this function)
cpsups.c:165: (Each undeclared identifier is reported only once
cpsups.c:165: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `cpsups.o'
hera:drivers> gcc -v
Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- niels at baggesen.net
The purpose of computing is insight, not numbers  --  R W Hamming



More information about the Nut-upsdev mailing list