• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Farhan/openssh


Commit MetaInfo

Revisión596e91616e2459cdefbea04554b85669ea4e4856 (tree)
Tiempo2017-11-11 11:44:13
AutorChih-Hung Hsieh <chh@goog...>
CommiterChih-Hung Hsieh

Log Message

Use -Werror and -Wno-error in external/openssh

* Suppress non-critical warnings.
* Keep other warnings to fix later.
* Some warnings cannot be suppressed so we added -Wno-error at the end.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I746ba8f7dc48232678af87749ef23789ee982aa7

Cambiar Resumen

Diferencia incremental

--- a/Android.mk
+++ b/Android.mk
@@ -1,5 +1,26 @@
11 LOCAL_PATH:= $(call my-dir)
22
3+openssh_common_cflags := \
4+ -Wall \
5+ -Werror \
6+ -Wno-error=implicit-function-declaration \
7+ -Wno-pointer-sign \
8+ -Wno-sign-compare \
9+ -Wno-type-limits \
10+ -Wno-unused-parameter \
11+ -Wno-unused-variable \
12+ -Wno-error \
13+
14+# Use -Wno-error to allow at least the following warnings:
15+# (1) bsd-openpty.c calls to 'ptsname' declared with attribute warning:
16+# ptsname is not thread-safe; use ptsname_r instead [-Werror]
17+# (2) external/boringssl/src/include/openssl/opensslfeatures.h:
18+# error: "OPENSSL_NO_BF" redefined [-Werror]
19+
20+openssh_common_clang_cflags := \
21+ -Wno-incompatible-pointer-types \
22+ -Wno-macro-redefined \
23+
324 ###################### libssh ######################
425 include $(CLEAR_VARS)
526
@@ -123,7 +144,8 @@ LOCAL_SHARED_LIBRARIES += libssl libcrypto libdl libz
123144
124145 LOCAL_MODULE := libssh
125146
126-LOCAL_CFLAGS+=-O3 -Wno-unused-parameter
147+LOCAL_CFLAGS += -O3 $(openssh_common_cflags)
148+LOCAL_CLANG_CFLAGS += $(openssh_common_clang_cflags)
127149
128150 LOCAL_CFLAGS += -DGCE_PLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
129151 ifneq ($(filter gce_x86 gce_x86_64 calypso, $(TARGET_DEVICE)),)
@@ -149,7 +171,8 @@ LOCAL_SRC_FILES := \
149171 LOCAL_MODULE := ssh
150172
151173
152-LOCAL_CFLAGS += -Wno-unused-parameter
174+LOCAL_CFLAGS += $(openssh_common_cflags)
175+LOCAL_CLANG_CFLAGS += $(openssh_common_clang_cflags)
153176
154177 LOCAL_C_INCLUDES := \
155178 external/zlib \
@@ -171,7 +194,8 @@ LOCAL_SRC_FILES := \
171194
172195 LOCAL_MODULE := sftp
173196
174-LOCAL_CFLAGS += -Wno-unused-parameter
197+LOCAL_CFLAGS += $(openssh_common_cflags)
198+LOCAL_CLANG_CFLAGS += $(openssh_common_clang_cflags)
175199
176200 LOCAL_C_INCLUDES := \
177201 external/zlib \
@@ -193,7 +217,8 @@ LOCAL_SRC_FILES := \
193217
194218 LOCAL_MODULE := scp
195219
196-LOCAL_CFLAGS += -Wno-unused-parameter
220+LOCAL_CFLAGS += $(openssh_common_cflags)
221+LOCAL_CLANG_CFLAGS += $(openssh_common_clang_cflags)
197222
198223 LOCAL_C_INCLUDES := \
199224 external/zlib \
@@ -257,7 +282,8 @@ LOCAL_SRC_FILES := \
257282
258283 LOCAL_MODULE := sshd
259284
260-LOCAL_CFLAGS += -Wno-unused-parameter
285+LOCAL_CFLAGS += $(openssh_common_cflags)
286+LOCAL_CLANG_CFLAGS += $(openssh_common_clang_cflags)
261287 ifneq ($(filter gce_x86 gce_x86_64 calypso, $(TARGET_DEVICE)),)
262288 LOCAL_CFLAGS += -DANDROID_GCE $(GCE_VERSION_CFLAGS)
263289 endif
@@ -282,7 +308,8 @@ LOCAL_SRC_FILES := \
282308
283309 LOCAL_MODULE := ssh-keygen
284310
285-LOCAL_CFLAGS += -Wno-unused-parameter
311+LOCAL_CFLAGS += $(openssh_common_cflags)
312+LOCAL_CLANG_CFLAGS += $(openssh_common_clang_cflags)
286313
287314 LOCAL_C_INCLUDES := \
288315 external/zlib \