Skip to content

tbb/area.cpp triggers clang compiler warning unused-but-set-variable (mac-osx) #2918

Open
@mitzimorris

Description

@mitzimorris

Description

Building lib/tbb/libtbb.dylib results in one warning; adding option -Wno-unused-but-set-variable to make/libraries will fix.

Example

>  make lib/tbb/libtbb.dylib

... 
clang++ -o arena.o -c -MMD -O2 -DUSE_PTHREAD -DDO_ITT_NOTIFY -stdlib=libc++ -m64 -mrtm -mmacosx-version-min=10.11  -fPIC  -D__TBB_BUILD=1 -Wall -Wno-non-virtual-dtor -Wno-dangling-else -Wno-unknown-warning-option -Wno-deprecated-copy   -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -std=c++1y  -I../tbb_2020.3/src -I../tbb_2020.3/src/rml/include -I../tbb_2020.3/include ../tbb_2020.3/src/tbb/arena.cpp
../tbb_2020.3/src/tbb/arena.cpp:308:14: warning: variable 'drained' set but not used [-Wunused-but-set-variable]
    intptr_t drained = 0;
             ^
1 warning generated.

....

Expected Output

All libraries should build without warnings; although this is just a warning, it's confusing to CmdStan and CmdStanX users.

Current Version:

v4.6.2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions