Minor compile cleanup
- Add .gitignore
- Changed ASFVOLT_LOG macro to recognize printf paramter warnings
- Removed -Wno-sign-compare from make. Fix warning in the source.
Change-Id: I5d98b327d906e980509ce071b5060c95635746a1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2065572
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,23 @@
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
diff --git a/src/Makefile b/src/Makefile
index eb8c6ef..21e5964 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -24,7 +24,7 @@
bal_tmqueue_hdlr.c \
bal_tmsched_hdlr.c
-C_OPTS=-std=c99 -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wparentheses -Wswitch -Wswitch-default -Wunused -Wuninitialized -Wunused-but-set-variable -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wshadow -Wno-inline -MMD -MP -Wno-strict-aliasing -g -gdwarf-3 -O0 -Wall -DBCMOS_MSG_QUEUE_DOMAIN_SOCKET -DBCMOS_MSG_QUEUE_UDP_SOCKET -DBCMOS_MEM_DEBUG -DBCMOS_SYS_UNITTEST -DENABLE_LOG -DDEV_LOG_SYSLOG -DENABLE_CLI -DCONFIG_LINENOISE -DCONFIG_EDITLINE -DQAX_SWITCH -Wno-redundant-decls -DOMCI_SVC -Wno-redundant-decls -DBCM_SUBSYSTEM_CORE -DBCM_PLATFORM_MAPLE -DBCM_OS_POSIX -DBCM_SUBSYSTEM_HOST -D_KERNEL_SPACE -DBCM_EPON -DBCM_GPON -DBCM_XGPON -DCONFIG_MAC_RPC -DCONFIG_SWITCH_RPC -DSIMULATION_BUILD -DBAL_MONOLITHIC -D_XOPEN_SOURCE=600
+C_OPTS=-std=c99 -Wall -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wparentheses -Wswitch -Wswitch-default -Wunused -Wuninitialized -Wunused-but-set-variable -Wno-unused-parameter -Wno-missing-field-initializers -Wshadow -MMD -MP -Wno-strict-aliasing -g -gdwarf-3 -O0 -Wall -DBCMOS_MSG_QUEUE_DOMAIN_SOCKET -DBCMOS_MSG_QUEUE_UDP_SOCKET -DBCMOS_MEM_DEBUG -DBCMOS_SYS_UNITTEST -DENABLE_LOG -DDEV_LOG_SYSLOG -DENABLE_CLI -DCONFIG_LINENOISE -DCONFIG_EDITLINE -DQAX_SWITCH -Wno-redundant-decls -DOMCI_SVC -Wno-redundant-decls -DBCM_SUBSYSTEM_CORE -DBCM_PLATFORM_MAPLE -DBCM_OS_POSIX -DBCM_SUBSYSTEM_HOST -D_KERNEL_SPACE -DBCM_EPON -DBCM_GPON -DBCM_XGPON -DCONFIG_MAC_RPC -DCONFIG_SWITCH_RPC -DSIMULATION_BUILD -DBAL_MONOLITHIC -D_XOPEN_SOURCE=600
INC_PATH= -I. -I$(BRDCM_SRC)/src/common/os_abstraction \
-I$(BRDCM_SRC)/src/common/os_abstraction/posix \
diff --git a/src/asfvolt16_driver.h b/src/asfvolt16_driver.h
index db74e62..5ee1a98 100755
--- a/src/asfvolt16_driver.h
+++ b/src/asfvolt16_driver.h
@@ -44,11 +44,11 @@
char bal_shared_lib_ip_port[24];
}balCoreIpInfo;
-#define ASFVOLT_LOG(log_type, args...) \
+#define ASFVOLT_LOG(log_type, format, args...) \
if(log_type) \
{\
printf("File(%s): Line(%d): ", __FUNCTION__, __LINE__);\
- printf(args);\
+ printf(format, ## args);\
}
diff --git a/src/bal_subscriber_terminal_hdlr.c b/src/bal_subscriber_terminal_hdlr.c
index 30d89fa..c0627ac 100755
--- a/src/bal_subscriber_terminal_hdlr.c
+++ b/src/bal_subscriber_terminal_hdlr.c
@@ -34,7 +34,7 @@
bcmbal_subscriber_terminal_key subs_terminal_key;
bcmos_bool skip_onu = BCMOS_FALSE;
- int idx;
+ size_t idx;
subs_terminal_key.sub_term_id = onu_cfg->key->sub_term_id;
subs_terminal_key.intf_id = onu_cfg->key->intf_id;