Skip to content

Commit

Permalink
Merged compiler warnings build refs, added -Wmissing-field-initialize…
Browse files Browse the repository at this point in the history
…rs flag.

	Change on 2015/12/11 by tball <[email protected]>
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110000733
  • Loading branch information
tomball committed Dec 14, 2015
1 parent d1e531b commit 7b3d28e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions inject/javax_inject/environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ CLASSES_DIR = $(BUILD_DIR)/classes
INJECT_SRC_JAR = $(JAVA_DEPS_JAR_DIR)/$(JAVAX_INJECT_SOURCE_JAR)
INJECT_JAR_FULL = $(JAVA_DEPS_JAR_DIR)/$(JAVAX_INJECT_JAR)

WARNINGS = -Wall -Werror

OBJCFLAGS := -ObjC $(WARNINGS) $(DEBUGFLAGS)
OBJCFLAGS := $(CC_WARNINGS) $(DEBUGFLAGS)

# J2ObjC settings
J2OBJC = $(DIST_DIR)/j2objc -classpath $(INJECT_JAR_FULL) -d $(BUILD_DIR)
Expand Down
3 changes: 1 addition & 2 deletions jre_emul/environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ TEST_SRC = $(subst $(eval) ,:,$(TEST_SRC_ROOTS))
vpath %.java $(JRE_SRC):$(TEST_SRC):$(STUBS_DIR)

# Clang warnings
WARNINGS := $(WARNINGS) -Wall -Werror -Wshorten-64-to-32 -Wsign-compare \
-Wno-unused-variable
WARNINGS := $(CC_WARNINGS) $(WARNINGS)

ifeq ("$(strip $(XCODE_VERSION_MAJOR))", "0500")
OBJCFLAGS += -DSET_MIN_IOS_VERSION
Expand Down
4 changes: 1 addition & 3 deletions jsr305/environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ CLASSES_DIR = $(BUILD_DIR)/classes
JSR305_SRC_JAR = $(JAVA_DEPS_JAR_DIR)/$(JSR305_SOURCE_JAR)
JSR305_JAR_FULL = $(JAVA_DEPS_JAR_DIR)/$(JSR305_JAR)

WARNINGS := -Wall -Werror

OBJCFLAGS := -ObjC $(WARNINGS) $(DEBUGFLAGS)
OBJCFLAGS := $(CC_WARNINGS) $(DEBUGFLAGS)

# J2ObjC settings
J2OBJC = $(DIST_DIR)/j2objc -classpath $(JSR305_JAR_FULL) -d $(BUILD_DIR)
Expand Down
3 changes: 3 additions & 0 deletions make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ endif
endif
DEBUGFLAGS := $(DEBUGFLAGS) -O$(OPTIMIZATION_LEVEL)

CC_WARNINGS = -Wall -Werror -Wshorten-64-to-32 \
-Wmissing-field-initializers -Wno-unused-variable

ifdef GCC_PREPROCESSOR_DEFINITIONS
DEBUGFLAGS += $(GCC_PREPROCESSOR_DEFINITIONS:%=-D%)
endif
Expand Down
4 changes: 1 addition & 3 deletions testing/mockito/environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ SUPERSOURCE_ROOT = src/main/java
MOCKITO_SOURCEPATH = $(SUPERSOURCE_ROOT):$(JAVA_SRC_DIR)
MOCKITO_CLASSPATH = $(MOCKITO_JAR_PATH):$(JUNIT_JAR_PATH):$(HAMCREST_JAR_PATH)

WARNINGS = -Wall -Werror

OBJCFLAGS := -ObjC $(WARNINGS) $(DEBUGFLAGS)
OBJCFLAGS := -ObjC $(CC_WARNINGS) $(DEBUGFLAGS)

# J2ObjC settings
J2OBJCC = $(ARCH_BIN_DIR)/j2objcc -c $(OBJCFLAGS) -I$(GEN_OBJC_DIR)
Expand Down

0 comments on commit 7b3d28e

Please sign in to comment.