clang warnings macOS

Bug #1796517 reported by Toni Förster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Undecided
Unassigned

Bug Description

Updated to Xcode 10 today. Although there were no warnings with the prior version anymore, here are some new ones.

Apple LLVM version 10.0.0 (clang-1000.11.45.2)

[1181/2222] Linking CXX static library src/base/libbase_utf8.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/base/libbase_utf8.a the table of contents is empty (no object file members in the library define global symbols)
[1184/2222] Linking CXX static library src/base/libbase_macros.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/base/libbase_macros.a the table of contents is empty (no object file members in the library define global symbols)
[1185/2222] Linking CXX static library src/base/libbase_math.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/base/libbase_math.a the table of contents is empty (no object file members in the library define global symbols)
[1820/2222] Building CXX object src/graphic/CMakeFiles/graphic_image_io.dir/image_io.cc.o
/Users/toni/Launchpad/widelands-repo/working_tree/src/graphic/image_io.cc:99:6: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]
        if (setjmp(png_jmpbuf(png_ptr))) { // NOLINT
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/setjmp.h:40:21: note: expanded from macro 'setjmp'
#define setjmp(env) setjmp(env)
                    ^
1 warning generated.
[1826/2222] Linking CXX static library src/graphic/libgraphic_text_constants.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/graphic/libgraphic_text_constants.a the table of contents is empty (no object file members in the library define global symbols)
[1828/2222] Linking CXX static library src/graphic/libgraphic_align.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/graphic/libgraphic_align.a the table of contents is empty (no object file members in the library define global symbols)
[1837/2222] Linking CXX static library src/logic/liblogic_constants.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/logic/liblogic_constants.a the table of contents is empty (no object file members in the library define global symbols)
[1967/2222] Linking CXX static library src/logic/liblogic_filesystem_constants.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/logic/liblogic_filesystem_constants.a the table of contents is empty (no object file members in the library define global symbols)
[1993/2222] Linking CXX static library src/sound/libnote_sound.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/sound/libnote_sound.a the table of contents is empty (no object file members in the library define global symbols)
[2056/2222] Linking CXX static library src/third_party/libthird_party_gettext.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/third_party/libthird_party_gettext.a the table of contents is empty (no object file members in the library define global symbols)
[2210/2222] Linking CXX static library src/graphic/libgraphic_styles.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: src/graphic/libgraphic_styles.a the table of contents is empty (no object file members in the library define global symbols)

Tags: buildsystem
Revision history for this message
GunChleoc (gunchleoc) wrote :

This happens because CMake doesn't like libraries that include only header files. We have added a dummy .cc file to all of those, which makes all compilers except for Clang on Mac happy. Clang on Linux does not have any issues with it.

tags: added: buildsystem
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.