Bug #1703
Unused static functions in `cpu-features.cc`
0%
Description
For context: I'm giving the CrystaX NDK a try on our cross-platform C++ code at Dropbox, previously built with NDK r11c, GCC 4.9, with GNU STL. I'm not sure if all of the issues I ran into will be considered bugs, but since your stated goal is to be a drop-in replacement I thought it worth sharing them as differences which an adopter has to deal with. We run with -Werror so any warnings will block our build.
The CrystaX version of cpu-features.cc
has some static functions which are unused on at least some architectures, which triggers warnings, which become errors with -Werror. An example error is below. It looks like the use sites of these static functions are inside of architecture-specific #ifdefs, so the functions themselves should be as well.
/Users/atwyman/Library/Android/crystax-ndk/sources/android/cpufeatures/cpu-features.c:210:1: error: 'extract_cpuinfo_field' defined but not used [-Werror=unused-function]
extract_cpuinfo_field(const char* buffer, int buflen, const char* field)
^
/Users/atwyman/Library/Android/crystax-ndk/sources/android/cpufeatures/cpu-features.c:260:1: error: 'has_list_item' defined but not used [-Werror=unused-function]
has_list_item(const char* list, const char* item)
^
/Users/atwyman/Library/Android/crystax-ndk/sources/android/cpufeatures/cpu-features.c:333:1: error: 'parse_hexadecimal' defined but not used [-Werror=unused-function]
parse_hexadecimal(const char* input, const char* limit, int* result)
^
cc1: all warnings being treated as errors
Updated by Dmitry Moskalchuk about 4 years ago
- Category set to libcrystax
- Assignee set to Dmitry Moskalchuk
- Priority changed from Normal to High