Discussion:
[tor-dev] 3.2.10 compiler warnings
grarpamp
2018-03-10 03:54:13 UTC
Permalink
Test from an older system before it was updated,
unlikely to be prevalent, so don't bother fixing unless obvious.

src/common/confline.c:135: warning: 'include_list' may be used
uninitialized in this function
src/common/confline.c:135: warning: 'include_list' may be used
uninitialized in this function
src/or/connection.c:1883: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
src/or/conscache.c:426: warning: passing argument 2 of
'consensus_cache_entry_map' discards qualifiers from pointer target
type
src/or/control.c:6815: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
src/or/scheduler.c:577: warning: format '%ld' expects type 'long int',
but argument 5 has type 'time_t'
src/or/connection.c:1883: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
src/or/conscache.c:426: warning: passing argument 2 of
'consensus_cache_entry_map' discards qualifiers from pointer target
type
src/or/control.c:6815: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
src/or/scheduler.c:577: warning: format '%ld' expects type 'long int',
but argument 5 has type 'time_t'
src/test/vote_descriptors.inc:93: warning: string length '4135' is
greater than the length '4095' ISO C99 compilers are required to
support
src/test/test_hs_descriptor.inc:224: warning: string length '14104' is
greater than the length '4095' ISO C99 compilers are required to
support
src/test/test_microdesc.c:648: warning: string length '5844' is
greater than the length '4095' ISO C99 compilers are required to
support
src/test/test_descriptors.inc:305: warning: string length '10571' is
greater than the length '4095' ISO C99 compilers are required to
support
teor
2018-03-10 04:20:05 UTC
Permalink
Thanks for the bug report.
Post by grarpamp
Test from an older system before it was updated,
Can you tell us what compiler and version, and what system?
Any arguments to configure?
And how did you get the Tor source code?
Post by grarpamp
unlikely to be prevalent, so don't bother fixing unless obvious.
I don't know why we didn't catch these warnings earlier.
Post by grarpamp
src/common/confline.c:135: warning: 'include_list' may be used
uninitialized in this function
src/common/confline.c:135: warning: 'include_list' may be used
uninitialized in this function
This is spurious, but I'm not surprised the compiler can't tell.
We should fix it.
Post by grarpamp
src/or/connection.c:1883: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
src/or/conscache.c:426: warning: passing argument 2 of
'consensus_cache_entry_map' discards qualifiers from pointer target
type
src/or/control.c:6815: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
These are annoying, and can sometimes be bugs.
Post by grarpamp
src/or/scheduler.c:577: warning: format '%ld' expects type 'long int',
but argument 5 has type 'time_t'
Please tell us about your system, we thought we had caught most of
these warnings.
Post by grarpamp
src/or/connection.c:1883: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
src/or/conscache.c:426: warning: passing argument 2 of
'consensus_cache_entry_map' discards qualifiers from pointer target
type
src/or/control.c:6815: warning: passing argument 1 of 'TO_OR_CONN'
discards qualifiers from pointer target type
src/or/scheduler.c:577: warning: format '%ld' expects type 'long int',
but argument 5 has type 'time_t'
As above.
Post by grarpamp
src/test/vote_descriptors.inc:93: warning: string length '4135' is
greater than the length '4095' ISO C99 compilers are required to
support
src/test/test_hs_descriptor.inc:224: warning: string length '14104' is
greater than the length '4095' ISO C99 compilers are required to
support
src/test/test_microdesc.c:648: warning: string length '5844' is
greater than the length '4095' ISO C99 compilers are required to
support
src/test/test_descriptors.inc:305: warning: string length '10571' is
greater than the length '4095' ISO C99 compilers are required to
support
We turn off this warning, why does your compiler report it?

T
grarpamp
2018-03-11 07:26:54 UTC
Permalink
Post by teor
Can you tell us what compiler and version, and what system?
Was gcc 4.2.1 modded by whatever freebsd did
in its 8.x series. Any extant bugs... ok, but don't bother
porting for those releases as they're EOL / moot.

Loading...