Merge "Use -Werror in hardware/libhardware/tests"

am: b4639a653f

Change-Id: Ic8d88ba6604e5ffd41d124bd5ccfc4b151f91444
This commit is contained in:
Chih-Hung Hsieh 2017-12-05 00:38:26 +00:00 committed by android-build-merger
commit 42c85194d8
10 changed files with 15 additions and 19 deletions

View file

@ -12,7 +12,7 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_C_INCLUDES += \
system/media/camera/include \
LOCAL_CFLAGS += -Wall -Wextra
LOCAL_CFLAGS += -Wall -Wextra -Werror
LOCAL_MODULE:= camera3_tests
LOCAL_MODULE_TAGS := tests

View file

@ -4,7 +4,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := static-hal-check
LOCAL_SRC_FILES := struct-size.cpp struct-offset.cpp struct-last.cpp
LOCAL_SHARED_LIBRARIES := libhardware
LOCAL_CFLAGS := -O0
LOCAL_CFLAGS := -O0 -Wall -Werror
LOCAL_C_INCLUDES += \
system/media/camera/include

View file

@ -24,7 +24,7 @@
#include <hardware/camera_common.h>
#include <hardware/camera3.h>
template<size_t> static constexpr size_t CheckSizeHelper(size_t, size_t);
template<size_t> static constexpr size_t CheckSizeHelper(size_t, size_t) __attribute((unused));
template<> constexpr size_t CheckSizeHelper<4>(size_t size32, size_t /* size64 */) {
return size32;

View file

@ -3,7 +3,7 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libcnativewindow
LOCAL_SRC_FILES := cnativewindow.c util.c
LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
LOCAL_SHARED_LIBRARIES := libEGL libGLESv2 libdl libhardware libnativewindow
include $(BUILD_STATIC_LIBRARY)
@ -12,5 +12,5 @@ LOCAL_MODULE := hwc-test-arrows
LOCAL_SRC_FILES := test-arrows.c
LOCAL_STATIC_LIBRARIES := libcnativewindow
LOCAL_SHARED_LIBRARIES := libEGL libGLESv2 libdl libhardware libnativewindow
LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -Wall -Werror
include $(BUILD_EXECUTABLE)

View file

@ -181,7 +181,7 @@ static void hwc_post(CNativeWindow *win, aBuffer *buf, int ffd) {
hwc_composer_device_1_t *hwc = win->hwc;
hwc_display_contents_1_t *dc = &(win->dc);
hwc_layer_1_t *dl = win->dc.hwLayers;
int r, i;
int r;
dc->retireFenceFd = -1;
dc->outbufAcquireFenceFd = -1;
@ -462,8 +462,8 @@ static int cnw_init(CNativeWindow *win) {
hw_module_t const* module;
framebuffer_device_t *fb = NULL;
alloc_device_t *gr;
int err, i, n;
unsigned usage, format;
int err, i;
unsigned usage;
memset(win, 0, sizeof(CNativeWindow));

View file

@ -36,7 +36,7 @@ void matrix_init_ortho(GLfloat *m, float w, float h) {
m[7] = -1.0;
m[8] = 0.0;
m[9] = 0.0;
m[10] -1.0;
m[10] = -1.0;
m[11] = 0.0;
m[12] = 0.0;
m[13] = 0.0;
@ -111,7 +111,7 @@ fail_frag:
int select_config_for_window(EGLDisplay dpy, EGLint *attr,
unsigned format, EGLConfig *config) {
EGLint R,G,B,A,r,g,b,a;
EGLint R,G,B,A;
EGLint i, n, max;
EGLConfig *cfg;

View file

@ -20,7 +20,7 @@ LOCAL_SHARED_LIBRARIES := \
libutils
LOCAL_CLANG := true
LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter
LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter
# TestHelpers uses mktemp. As the path is given to TempFile, we can't do too much
# here (e.g., use mkdtemp first). At least races will lead to an early failure, as

View file

@ -14,6 +14,8 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE := keymaster_test
LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)

View file

@ -649,9 +649,6 @@ TEST_F(KeymasterTest, GetKeypairPublic_EC_Success) {
}
TEST_F(KeymasterTest, GetKeypairPublic_NullKey_Failure) {
uint8_t* key_blob;
size_t key_blob_length;
uint8_t* x509_data = NULL;
size_t x509_data_length;
ASSERT_EQ(-1,
@ -1033,9 +1030,6 @@ TEST_F(KeymasterTest, SignData_RSA_Raw_NullOutput_Failure) {
.padding_type = PADDING_NONE,
};
uint8_t* sig;
size_t sig_length;
UniqueReadOnlyBlob testData(TEST_RSA_KEY_1, sizeof(TEST_RSA_KEY_1));
ASSERT_TRUE(testData.get() != NULL);

View file

@ -25,7 +25,7 @@ LOCAL_SHARED_LIBRARIES := \
liblog \
libhardware \
LOCAL_CFLAGS += -Wall -Wextra
LOCAL_CFLAGS += -Wall -Wextra -Werror
LOCAL_MODULE:= vehicle_tests
LOCAL_MODULE_TAGS := tests