Boost logo

Boost :

From: Vince Tse (vtse_at_[hidden])
Date: 2006-08-23 09:21:33


When compiling the Boost source tree (Aug 22, 2006 snapshot) with GCC 3.4 on
Gentoo Linux on AMD64, you¹ll get 3 warnings about unused variables. The
patch is attached.

Building:
bjam -sTOOLS=gcc -s"GCC=gcc -Wall -Werror" -s"GXX=g++ -Wall -Werror" -q
stage

Compiler:
gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Uname:
Linux ses0247 2.6.15-gentoo-r5-1 #2 SMP Fri Mar 10 17:11:28 UTC 2006 x86_64
Dual Core AMD Opteron(tm) Processor 275 AuthenticAMD GNU/Linux

The 3 variables concerned are created to be used in an assert() statement,
but any asserts get replaced with static_cast<void>(0), thus resulting in an
unused variable. Breaking up declaration and initialization fixes this
issue.




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk