Project

General

Profile

Bug #1703

Unused static functions in `cpu-features.cc`

Added by Andrew Twyman almost 3 years ago. Updated almost 3 years ago.

Status:
Open
Priority:
High
Category:
libcrystax
Target version:
Start date:
02/16/2017
Due date:
% Done:

0%

Estimated time:
CPU Architecture:
arm, x86
Host OS:
OS X
Toolchain:
gcc-4.9
Android version:
4.1 (android-16)
CrystaX Version:

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

History

#1

Updated by Dmitry Moskalchuk almost 3 years ago

  • Category set to libcrystax
  • Assignee set to Dmitry Moskalchuk
  • Priority changed from Normal to High

Also available in: Atom PDF