Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #26785
Closed (moved) (moved)
Open
Issue created Jul 13, 2018 by Taylor Yu@catalyst

older gccs don't accept -Wunused-const-variable

In src/common/compress_zstd.c, we use the DISABLE_GCC_WARNING() macro to disable the -Wunused-const-variable warning. Some versions of gcc don't recognize that warning option, so they will warn about incorrect pragma usage.

src/common/compress_zstd.c:29:1: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 DISABLE_GCC_WARNING(unused-const-variable)
 ^

We should probably define a macro if -Wunused-const-variable is supported by gcc and update the preprocessor conditional in compress_zstd.c

#ifdef HAVE_ZSTD
DISABLE_GCC_WARNING(unused-const-variable)

to use it.

Reported on IRC.

Confirmed on Xenial with gcc 5.4.0-6ubuntu116.04.10 and libzstd1-dev 1.3.1+dfsg-1ubuntu0.16.04.1. Travis is still on Trusty so doesn't have a libzstd-dev.

This might be a regression on platforms with libzstd but an older gcc.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking