caomw / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

GOOGLE_GLOG_COMPILE_ASSERT causes warnings on newer gcc #198

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When compiling using the latest gcc, the compiler assertion used by LOG_EVERY_N 
generates an unused typedef warning:

              warning: typedef ‘INVALID_REQUESTED_LOG_SEVERITY’ locally defined 
              but not used [-Wunused-local-typedefs]

The Chromium base/macros.h implementation of the same code uses 
__attribute__((unused)) on the typedef to fix the problem (see 
https://chromium.googlesource.com/chromium/src/base/+/master/macros.h)

Attaching a patch which fixes the issue for me.

Original issue reported on code.google.com by tlip...@gmail.com on 7 Apr 2014 at 7:14

Attachments: