[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #26272 [Core Tor/Tor]: gcc 7 fails on -Wunused-const-variable for Zstd headers



#26272: gcc 7 fails on -Wunused-const-variable for Zstd headers
-------------------------+-------------------------------------------------
     Reporter:  teor     |      Owner:  (none)
         Type:  defect   |     Status:  new
     Priority:  Medium   |  Milestone:  Tor: 0.3.4.x-final
    Component:  Core     |    Version:  Tor: 0.3.1.1-alpha
  Tor/Tor                |   Keywords:  fast-fix, 033-backport,
     Severity:  Normal   |  032-backport, 031-backport
Actual Points:           |  Parent ID:
       Points:           |   Reviewer:
      Sponsor:           |
-------------------------+-------------------------------------------------
 When using gcc 7 on macOS:
 {{{
 $ gcc-7 --version
 gcc-7 (Homebrew GCC 7.3.0) 7.3.0
 }}}

 I see the following errors:
 {{{
 In file included from ../src/common/compress_zstd.c:29:0:
 /usr/local/Cellar/zstd/1.3.4//include/zstd.h:593:29: error:
 'ZSTD_defaultCMem' defined but not used [-Werror=unused-const-variable=]
  static ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL };
 /**< this constant defers to stdlib's functions */
                              ^~~~~~~~~~~~~~~~
 /usr/local/Cellar/zstd/1.3.4//include/zstd.h:404:21: error:
 'ZSTD_skippableHeaderSize' defined but not used [-Werror=unused-const-
 variable=]
  static const size_t ZSTD_skippableHeaderSize = 8;  /* magic number +
 skippable frame length */
                      ^~~~~~~~~~~~~~~~~~~~~~~~
 /usr/local/Cellar/zstd/1.3.4//include/zstd.h:403:21: error:
 'ZSTD_frameHeaderSize_max' defined but not used [-Werror=unused-const-
 variable=]
  static const size_t ZSTD_frameHeaderSize_max = ZSTD_FRAMEHEADERSIZE_MAX;
                      ^~~~~~~~~~~~~~~~~~~~~~~~
 /usr/local/Cellar/zstd/1.3.4//include/zstd.h:402:21: error:
 'ZSTD_frameHeaderSize_min' defined but not used [-Werror=unused-const-
 variable=]
  static const size_t ZSTD_frameHeaderSize_min = ZSTD_FRAMEHEADERSIZE_MIN;
                      ^~~~~~~~~~~~~~~~~~~~~~~~
 /usr/local/Cellar/zstd/1.3.4//include/zstd.h:401:21: error:
 'ZSTD_frameHeaderSize_prefix' defined but not used [-Werror=unused-const-
 variable=]
  static const size_t ZSTD_frameHeaderSize_prefix =
 ZSTD_FRAMEHEADERSIZE_PREFIX;
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26272>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs