[tor-bugs] #27772 [Core Tor/Tor]: Compile without warnings on GCC 8.2.0 with LTO enabled

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 18 19:46:27 UTC 2018


#27772: Compile without warnings on GCC 8.2.0 with LTO enabled
--------------------------+------------------------------------
 Reporter:  nickm         |          Owner:  nickm
     Type:  defect        |         Status:  assigned
 Priority:  Medium        |      Milestone:  Tor: 0.3.5.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by nickm):

 See my branch 'bug27772' with PR at
 https://github.com/torproject/tor/pull/356 .

 I haven't written a changes for this yet, because I'd like a reviewer's
 opinion on how many of these to backport how far.

 There are remaining warnings: I think there is some bug in GCC's LTO where
 it doesn't handle "#pragma diagnostic" properly -- since these are
 warnings we have explicitly suppressed in the code:
 {{{
 src/lib/meminfo/meminfo.c: In function ‘tor_log_mallinfo’:
 src/lib/meminfo/meminfo.c:48:8: warning: function call has aggregate value
 [-Waggregate-return]
    mi = mallinfo();
         ^
 src/test/test_bt_cl.c: In function ‘crash’:
 src/test/test_bt_cl.c:43:24: warning: null pointer dereference [-Wnull-
 dereference]
      *(volatile int *)0 = 0;
                         ^
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27772#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list