From c40ce04acce103186b4a7eceea6d84ea22499c7d Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周三, 22 4月 2015 02:59:59 +0800 Subject: [PATCH] Add more compile checks and resolve warnings --- examples/test-tcp-srq/Makefile | 2 libscpi/Makefile | 22 +++--- examples/test-interactive/Makefile | 2 libscpi/test/test_lexer_parser.c | 34 +++++----- examples/test-tcp-srq/main.c | 1 examples/common/scpi-def.c | 18 +++--- examples/test-parser/Makefile | 2 examples/test-tcp/Makefile | 2 libscpi/inc/scpi/ieee488.h | 2 libscpi/src/units.c | 1 libscpi/test/test_scpi_utils.c | 22 +++--- examples/test-tcp/main.c | 1 libscpi/test/test_parser.c | 22 +++--- libscpi/test/test_fifo.c | 6 +- 14 files changed, 71 insertions(+), 66 deletions(-) diff --git a/examples/common/scpi-def.c b/examples/common/scpi-def.c index dbb869b..aa3866d 100644 --- a/examples/common/scpi-def.c +++ b/examples/common/scpi-def.c @@ -40,7 +40,7 @@ #include "scpi/scpi.h" #include "scpi-def.h" -scpi_result_t DMM_MeasureVoltageDcQ(scpi_t * context) { +static scpi_result_t DMM_MeasureVoltageDcQ(scpi_t * context) { scpi_number_t param1, param2; char bf[15]; fprintf(stderr, "meas:volt:dc\r\n"); // debug command name @@ -69,7 +69,7 @@ } -scpi_result_t DMM_MeasureVoltageAcQ(scpi_t * context) { +static scpi_result_t DMM_MeasureVoltageAcQ(scpi_t * context) { scpi_number_t param1, param2; char bf[15]; fprintf(stderr, "meas:volt:ac\r\n"); // debug command name @@ -97,7 +97,7 @@ return SCPI_RES_OK; } -scpi_result_t DMM_ConfigureVoltageDc(scpi_t * context) { +static scpi_result_t DMM_ConfigureVoltageDc(scpi_t * context) { double param1, param2; fprintf(stderr, "conf:volt:dc\r\n"); // debug command name @@ -117,7 +117,7 @@ return SCPI_RES_OK; } -scpi_result_t TEST_Bool(scpi_t * context) { +static scpi_result_t TEST_Bool(scpi_t * context) { scpi_bool_t param1; fprintf(stderr, "TEST:BOOL\r\n"); // debug command name @@ -139,7 +139,7 @@ }; -scpi_result_t TEST_ChoiceQ(scpi_t * context) { +static scpi_result_t TEST_ChoiceQ(scpi_t * context) { int32_t param; const char * name; @@ -156,14 +156,14 @@ return SCPI_RES_OK; } -scpi_result_t TEST_Numbers(scpi_t * context) { +static scpi_result_t TEST_Numbers(scpi_t * context) { fprintf(stderr, "RAW CMD %.*s\r\n", (int)context->param_list.cmd_raw.length, context->param_list.cmd_raw.data); return SCPI_RES_OK; } -scpi_result_t TEST_Text(scpi_t * context) { +static scpi_result_t TEST_Text(scpi_t * context) { char buffer[100]; size_t copy_len; @@ -175,7 +175,7 @@ return SCPI_RES_OK; } -scpi_result_t TEST_ArbQ(scpi_t * context) { +static scpi_result_t TEST_ArbQ(scpi_t * context) { const char * data; size_t len; @@ -194,7 +194,7 @@ * * Return SCPI_RES_OK */ -scpi_result_t My_CoreTstQ(scpi_t * context) { +static scpi_result_t My_CoreTstQ(scpi_t * context) { SCPI_ResultInt(context, 0); diff --git a/examples/test-interactive/Makefile b/examples/test-interactive/Makefile index 3338b7b..400e123 100644 --- a/examples/test-interactive/Makefile +++ b/examples/test-interactive/Makefile @@ -2,7 +2,7 @@ PROG = test SRCS = main.c ../common/scpi-def.c -CFLAGS += -Wextra -I ../../libscpi/inc/ +CFLAGS += -Wextra -Wmissing-prototypes -Wimplicit -I ../../libscpi/inc/ LDFLAGS += ../../libscpi/dist/libscpi.a -Wl,--as-needed .PHONY: clean all diff --git a/examples/test-parser/Makefile b/examples/test-parser/Makefile index 3338b7b..400e123 100644 --- a/examples/test-parser/Makefile +++ b/examples/test-parser/Makefile @@ -2,7 +2,7 @@ PROG = test SRCS = main.c ../common/scpi-def.c -CFLAGS += -Wextra -I ../../libscpi/inc/ +CFLAGS += -Wextra -Wmissing-prototypes -Wimplicit -I ../../libscpi/inc/ LDFLAGS += ../../libscpi/dist/libscpi.a -Wl,--as-needed .PHONY: clean all diff --git a/examples/test-tcp-srq/Makefile b/examples/test-tcp-srq/Makefile index 3338b7b..400e123 100644 --- a/examples/test-tcp-srq/Makefile +++ b/examples/test-tcp-srq/Makefile @@ -2,7 +2,7 @@ PROG = test SRCS = main.c ../common/scpi-def.c -CFLAGS += -Wextra -I ../../libscpi/inc/ +CFLAGS += -Wextra -Wmissing-prototypes -Wimplicit -I ../../libscpi/inc/ LDFLAGS += ../../libscpi/dist/libscpi.a -Wl,--as-needed .PHONY: clean all diff --git a/examples/test-tcp-srq/main.c b/examples/test-tcp-srq/main.c index af6cc61..6c97dfc 100644 --- a/examples/test-tcp-srq/main.c +++ b/examples/test-tcp-srq/main.c @@ -44,6 +44,7 @@ #include <sys/ioctl.h> #include <errno.h> #include <arpa/inet.h> +#include <unistd.h> #include "scpi/scpi.h" #include "../common/scpi-def.h" diff --git a/examples/test-tcp/Makefile b/examples/test-tcp/Makefile index 3338b7b..400e123 100644 --- a/examples/test-tcp/Makefile +++ b/examples/test-tcp/Makefile @@ -2,7 +2,7 @@ PROG = test SRCS = main.c ../common/scpi-def.c -CFLAGS += -Wextra -I ../../libscpi/inc/ +CFLAGS += -Wextra -Wmissing-prototypes -Wimplicit -I ../../libscpi/inc/ LDFLAGS += ../../libscpi/dist/libscpi.a -Wl,--as-needed .PHONY: clean all diff --git a/examples/test-tcp/main.c b/examples/test-tcp/main.c index e4d9c41..3099899 100644 --- a/examples/test-tcp/main.c +++ b/examples/test-tcp/main.c @@ -44,6 +44,7 @@ #include <sys/ioctl.h> #include <errno.h> #include <arpa/inet.h> +#include <unistd.h> #include "scpi/scpi.h" #include "../common/scpi-def.h" diff --git a/libscpi/Makefile b/libscpi/Makefile index 3b90cf4..c703e8a 100644 --- a/libscpi/Makefile +++ b/libscpi/Makefile @@ -1,6 +1,6 @@ LIBNAME = scpi -CFLAGS += -Wextra -g -Iinc +CFLAGS += -Wextra -Wmissing-prototypes -Wimplicit -g -Iinc LDFLAGS += -Wl,--as-needed TESTFLAGS += -lcunit $(CFLAGS) @@ -30,7 +30,7 @@ ) \ -TESTS = $(addprefix test/, \ +TESTS = $(addprefix $(TESTDIR)/, \ test_fifo.c test_scpi_utils.c test_lexer_parser.c test_parser.c\ ) @@ -41,6 +41,13 @@ all: static +static: $(DISTDIR)/$(STATICLIB) + +clean: + $(RM) -r $(OBJDIR) $(DISTDIR) $(TESTS_BINS) $(TESTS_OBJS) + +test: $(TESTS_BINS) + for t in $(TESTS_BINS); do ./$$t; done $(OBJDIR): mkdir -p $@ @@ -54,21 +61,14 @@ $(DISTDIR)/$(STATICLIB): $(OBJS) $(AR) $(STATICLIBFLAGS) $(DISTDIR)/$(STATICLIB) $(OBJS) -static: $(DISTDIR)/$(STATICLIB) -$(OBJS): $(HDRS) $(DISTDIR) $(OBJDIR) - -clean: - $(RM) -r $(OBJDIR) $(DISTDIR) $(TESTS_BINS) $(TESTS_OBJS) - -test: static $(TESTS_BINS) - for t in $(TESTS_BINS); do ./$$t; done +$(OBJS): $(HDRS) $(DISTDIR) $(OBJDIR) $(SRCS) $(TESTDIR)/%.o: $(TESTDIR)/%.c $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< -$(TESTDIR)/%.test: $(TESTDIR)/%.o +$(TESTDIR)/%.test: $(TESTDIR)/%.o $(DISTDIR)/$(STATICLIB) $(CC) $(TESTFLAGS) $< $(DISTDIR)/$(STATICLIB) -o $@ $(LDFLAGS) diff --git a/libscpi/inc/scpi/ieee488.h b/libscpi/inc/scpi/ieee488.h index f9c02ce..98c9524 100644 --- a/libscpi/inc/scpi/ieee488.h +++ b/libscpi/inc/scpi/ieee488.h @@ -83,6 +83,8 @@ void SCPI_RegSetBits(scpi_t * context, scpi_reg_name_t name, scpi_reg_val_t bits); void SCPI_RegClearBits(scpi_t * context, scpi_reg_name_t name, scpi_reg_val_t bits); +void SCPI_EventClear(scpi_t * context); + #ifdef __cplusplus } #endif diff --git a/libscpi/src/units.c b/libscpi/src/units.c index 3a2ac15..517bb1a 100644 --- a/libscpi/src/units.c +++ b/libscpi/src/units.c @@ -38,6 +38,7 @@ #include "scpi/parser.h" #include "scpi/units.h" #include "utils_private.h" +#include "scpi/utils.h" #include "scpi/error.h" #include "lexer_private.h" diff --git a/libscpi/test/test_fifo.c b/libscpi/test/test_fifo.c index 04b7ea9..37d2b02 100644 --- a/libscpi/test/test_fifo.c +++ b/libscpi/test/test_fifo.c @@ -15,15 +15,15 @@ * CUnit Test Suite */ -int init_suite(void) { +static int init_suite(void) { return 0; } -int clean_suite(void) { +static int clean_suite(void) { return 0; } -void testFifo() { +static void testFifo() { scpi_fifo_t fifo; fifo_init(&fifo); int16_t value; diff --git a/libscpi/test/test_lexer_parser.c b/libscpi/test/test_lexer_parser.c index 9ea883f..3599f4e 100644 --- a/libscpi/test/test_lexer_parser.c +++ b/libscpi/test/test_lexer_parser.c @@ -17,18 +17,18 @@ * CUnit Test Suite */ -int init_suite(void) { +static int init_suite(void) { return 0; } -int clean_suite(void) { +static int clean_suite(void) { return 0; } typedef int (*lexfn_t)(lex_state_t * state, scpi_token_t * token); typedef int (*lexfn2_t)(lex_state_t * state, scpi_token_t * token, int * cnt); -const char * typeToStr(scpi_token_type_t type) { +static const char * typeToStr(scpi_token_type_t type) { switch (type) { case SCPI_TOKEN_COMMA: return "TokComma"; case SCPI_TOKEN_SEMICOLON: return "TokSemicolon"; @@ -58,7 +58,7 @@ } } -void printToken(scpi_token_t * token) { +static void printToken(scpi_token_t * token) { printf("Token:\r\n"); printf("\t->type = %s\r\n", typeToStr(token->type)); printf("\t->ptr = %p (\"%.*s\")\r\n", token->ptr, token->len, token->ptr); @@ -102,23 +102,23 @@ } while(0) -void testWhiteSpace(void) { +static void testWhiteSpace(void) { TEST_TOKEN(" \t MEAS", scpiLex_WhiteSpace, 0, 4, SCPI_TOKEN_WS); TEST_TOKEN("MEAS", scpiLex_WhiteSpace, 0, 0, SCPI_TOKEN_UNKNOWN); } -void testNondecimal(void) { +static void testNondecimal(void) { TEST_TOKEN("#H123fe5A", scpiLex_NondecimalNumericData, 2, 7, SCPI_TOKEN_HEXNUM); TEST_TOKEN("#B0111010101", scpiLex_NondecimalNumericData, 2, 10, SCPI_TOKEN_BINNUM); TEST_TOKEN("#Q125725433", scpiLex_NondecimalNumericData, 2, 9, SCPI_TOKEN_OCTNUM); } -void testCharacterProgramData(void) { +static void testCharacterProgramData(void) { TEST_TOKEN("abc_213as564", scpiLex_CharacterProgramData, 0, 12, SCPI_TOKEN_PROGRAM_MNEMONIC); TEST_TOKEN("abc_213as564 , ", scpiLex_CharacterProgramData, 0, 12, SCPI_TOKEN_PROGRAM_MNEMONIC); } -void testDecimal(void) { +static void testDecimal(void) { TEST_TOKEN("10", scpiLex_DecimalNumericProgramData, 0, 2, SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA); TEST_TOKEN("10 , ", scpiLex_DecimalNumericProgramData, 0, 2, SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA); TEST_TOKEN("-10.5 , ", scpiLex_DecimalNumericProgramData, 0, 5, SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA); @@ -129,12 +129,12 @@ TEST_TOKEN("1.5E12", scpiLex_DecimalNumericProgramData, 0, 6, SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA); } -void testSuffix(void) { +static void testSuffix(void) { TEST_TOKEN("A/V , ", scpiLex_SuffixProgramData, 0, 3, SCPI_TOKEN_SUFFIX_PROGRAM_DATA); TEST_TOKEN("mA.h", scpiLex_SuffixProgramData, 0, 4, SCPI_TOKEN_SUFFIX_PROGRAM_DATA); } -void testProgramHeader(void) { +static void testProgramHeader(void) { TEST_TOKEN("*IDN? ", scpiLex_ProgramHeader, 0, 5, SCPI_TOKEN_COMMON_QUERY_PROGRAM_HEADER); TEST_TOKEN("*RST ", scpiLex_ProgramHeader, 0, 4, SCPI_TOKEN_COMMON_PROGRAM_HEADER); TEST_TOKEN("*?; ", scpiLex_ProgramHeader, 0, 1, SCPI_TOKEN_INCOMPLETE_COMMON_PROGRAM_HEADER); @@ -149,7 +149,7 @@ TEST_TOKEN("]]", scpiLex_ProgramHeader, 0, 0, SCPI_TOKEN_UNKNOWN); } -void testArbitraryBlock(void) { +static void testArbitraryBlock(void) { TEST_TOKEN("#12AB", scpiLex_ArbitraryBlockProgramData, 3, 2, SCPI_TOKEN_ARBITRARY_BLOCK_PROGRAM_DATA); TEST_TOKEN("#12AB, ", scpiLex_ArbitraryBlockProgramData, 3, 2, SCPI_TOKEN_ARBITRARY_BLOCK_PROGRAM_DATA); TEST_TOKEN("#13AB", scpiLex_ArbitraryBlockProgramData, 0, 0, SCPI_TOKEN_UNKNOWN); @@ -157,13 +157,13 @@ TEST_TOKEN("#02AB, ", scpiLex_ArbitraryBlockProgramData, 0, 0, SCPI_TOKEN_UNKNOWN); } -void testExpression(void) { +static void testExpression(void) { TEST_TOKEN("( 1 + 2 )", scpiLex_ProgramExpression, 0, 9, SCPI_TOKEN_PROGRAM_EXPRESSION); TEST_TOKEN("( 1 + 2 ) , ", scpiLex_ProgramExpression, 0, 9, SCPI_TOKEN_PROGRAM_EXPRESSION); TEST_TOKEN("( 1 + 2 , ", scpiLex_ProgramExpression, 0, 0, SCPI_TOKEN_UNKNOWN); } -void testString(void) { +static void testString(void) { TEST_TOKEN("\"ahoj\"", scpiLex_StringProgramData, 1, 4, SCPI_TOKEN_DOUBLE_QUOTE_PROGRAM_DATA); TEST_TOKEN("\"ahoj\" ", scpiLex_StringProgramData, 1, 4, SCPI_TOKEN_DOUBLE_QUOTE_PROGRAM_DATA); TEST_TOKEN("'ahoj' ", scpiLex_StringProgramData, 1, 4, SCPI_TOKEN_SINGLE_QUOTE_PROGRAM_DATA); @@ -173,7 +173,7 @@ TEST_TOKEN("\"ah\"\"oj\" ", scpiLex_StringProgramData, 1, 6, SCPI_TOKEN_DOUBLE_QUOTE_PROGRAM_DATA); } -void testProgramData(void) { +static void testProgramData(void) { TEST_TOKEN("#H123fe5A", scpiParser_parseProgramData, 2, 7, SCPI_TOKEN_HEXNUM); TEST_TOKEN(" #H123fe5A ", scpiParser_parseProgramData, 4, 7, SCPI_TOKEN_HEXNUM); TEST_TOKEN("#B0111010101", scpiParser_parseProgramData, 2, 10, SCPI_TOKEN_BINNUM); @@ -233,7 +233,7 @@ } while(0) -void testAllProgramData(void) { +static void testAllProgramData(void) { TEST_ALL_TOKEN("1.5E12 V", scpiParser_parseAllProgramData, 0, 8, SCPI_TOKEN_ALL_PROGRAM_DATA, 1); TEST_ALL_TOKEN("1.5E12 V, abc_213as564, 10, #H123fe5A", scpiParser_parseAllProgramData, 0, 37, SCPI_TOKEN_ALL_PROGRAM_DATA, 4); TEST_ALL_TOKEN("1.5E12 V, ", scpiParser_parseAllProgramData, 0, 0, SCPI_TOKEN_UNKNOWN, -1); @@ -256,7 +256,7 @@ CU_ASSERT_EQUAL(state.termination, t); \ } while(0) -void testDetectProgramMessageUnit(void) { +static void testDetectProgramMessageUnit(void) { TEST_DETECT("*IDN?\r\n", 0, 5, SCPI_TOKEN_COMMON_QUERY_PROGRAM_HEADER, 5, 0, SCPI_MESSAGE_TERMINATION_NL); TEST_DETECT(" MEAS:VOLT:DC?\r\n", 1, 13, SCPI_TOKEN_COMPOUND_QUERY_PROGRAM_HEADER, 14, 0, SCPI_MESSAGE_TERMINATION_NL); TEST_DETECT(" MEAS:VOLT:DC? 1.2 V\r\n", 1, 13, SCPI_TOKEN_COMPOUND_QUERY_PROGRAM_HEADER, 15, 1, SCPI_MESSAGE_TERMINATION_NL); @@ -266,7 +266,7 @@ TEST_DETECT("[\r\n", 0, 1, SCPI_TOKEN_INVALID, 0, 0, SCPI_MESSAGE_TERMINATION_NONE); } -void testBoolParameter(void) { +static void testBoolParameter(void) { TEST_TOKEN(" 1", scpiParser_parseProgramData, 1, 1, SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA); TEST_TOKEN(" 0", scpiParser_parseProgramData, 1, 1, SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA); TEST_TOKEN(" ON", scpiParser_parseProgramData, 1, 2, SCPI_TOKEN_PROGRAM_MNEMONIC); diff --git a/libscpi/test/test_parser.c b/libscpi/test/test_parser.c index cee918f..1df24e8 100644 --- a/libscpi/test/test_parser.c +++ b/libscpi/test/test_parser.c @@ -13,7 +13,7 @@ * CUnit Test Suite */ -scpi_result_t text_function(scpi_t* context) { +static scpi_result_t text_function(scpi_t* context) { char param[100]; size_t param_len; @@ -30,14 +30,14 @@ return SCPI_RES_OK; } -scpi_result_t test_treeA(scpi_t* context) { +static scpi_result_t test_treeA(scpi_t* context) { SCPI_ResultInt(context, 10); return SCPI_RES_OK; } -scpi_result_t test_treeB(scpi_t* context) { +static scpi_result_t test_treeB(scpi_t* context) { SCPI_ResultInt(context, 20); @@ -174,17 +174,17 @@ }; -int init_suite(void) { +static int init_suite(void) { SCPI_Init(&scpi_context); return 0; } -int clean_suite(void) { +static int clean_suite(void) { return 0; } -void testCommandsHandling(void) { +static void testCommandsHandling(void) { #define TEST_INPUT(data, output) { \ SCPI_Input(&scpi_context, data, strlen(data)); \ CU_ASSERT_STRING_EQUAL(output, output_buffer); \ @@ -221,7 +221,7 @@ error_buffer_clear(); } -void testErrorHandling(void) { +static void testErrorHandling(void) { output_buffer_clear(); error_buffer_clear(); @@ -249,7 +249,7 @@ error_buffer_clear(); } -void testIEEE4882(void) { +static void testIEEE4882(void) { #define TEST_IEEE4882(data, output) { \ SCPI_Input(&scpi_context, data, strlen(data)); \ CU_ASSERT_STRING_EQUAL(output, output_buffer); \ @@ -316,7 +316,7 @@ CU_ASSERT_EQUAL(errCode, expected_error_code); \ } -void testSCPI_ParamInt(void) { +static void testSCPI_ParamInt(void) { TEST_ParamInt("10", TRUE, 10, TRUE, 0); TEST_ParamInt("", FALSE, 0, FALSE, 0); TEST_ParamInt("10.5", TRUE, 10, TRUE, 0); // TODO: should be FALSE, -104 @@ -351,7 +351,7 @@ CU_ASSERT_EQUAL(errCode, expected_error_code); \ } -void testSCPI_ParamDouble(void) { +static void testSCPI_ParamDouble(void) { TEST_ParamDouble("10", TRUE, 10, TRUE, 0); TEST_ParamDouble("", FALSE, 0, FALSE, 0); TEST_ParamDouble("10.5", TRUE, 10.5, TRUE, 0); @@ -387,7 +387,7 @@ CU_ASSERT_EQUAL(errCode, expected_error_code); \ } -void testSCPI_ParamCharacters(void) { +static void testSCPI_ParamCharacters(void) { TEST_ParamCharacters("10", TRUE, "10", TRUE, 0); TEST_ParamCharacters(" ABCD", TRUE, "ABCD", TRUE, 0); // TokProgramMnemonic TEST_ParamCharacters("\"ABCD\"", TRUE, "ABCD", TRUE, 0); // TokDoubleQuoteProgramData diff --git a/libscpi/test/test_scpi_utils.c b/libscpi/test/test_scpi_utils.c index ad85399..1956d67 100644 --- a/libscpi/test/test_scpi_utils.c +++ b/libscpi/test/test_scpi_utils.c @@ -45,15 +45,15 @@ * CUnit Test Suite */ -int init_suite(void) { +static int init_suite(void) { return 0; } -int clean_suite(void) { +static int clean_suite(void) { return 0; } -void test_strnpbrk() { +static void test_strnpbrk() { char str[] = "ahoj"; CU_ASSERT(strnpbrk(str, 4, "a") == (str + 0)); @@ -68,7 +68,7 @@ -void test_longToStr() { +static void test_longToStr() { char str[32]; size_t len; @@ -97,7 +97,7 @@ CU_ASSERT(str[2] == '\0'); } -void test_doubleToStr() { +static void test_doubleToStr() { size_t result; char str[50]; @@ -119,7 +119,7 @@ TEST_DOUBLE_TO_STR(-1.3e-30, 8, "-1.3e-30"); } -void test_strToLong() { +static void test_strToLong() { size_t result; int32_t val; @@ -144,7 +144,7 @@ TEST_STR_TO_LONG("18", 1, 1, 8); // octal 1, 8 is ignored } -void test_strToDouble() { +static void test_strToDouble() { double val; size_t result; @@ -177,7 +177,7 @@ } -void test_compareStr() { +static void test_compareStr() { CU_ASSERT_TRUE(compareStr("abcd", 1, "afgh", 1)); CU_ASSERT_TRUE(compareStr("ABCD", 4, "abcd", 4)); @@ -188,7 +188,7 @@ CU_ASSERT_FALSE(compareStr("ABCD", 4, "abcd", 3)); } -void test_compareStrAndNum() { +static void test_compareStrAndNum() { CU_ASSERT_TRUE(compareStrAndNum("abcd", 1, "afgh", 1)); CU_ASSERT_TRUE(compareStrAndNum("ABCD", 4, "abcd", 4)); @@ -206,7 +206,7 @@ } -void test_matchPattern() { +static void test_matchPattern() { scpi_bool_t result; #define TEST_MATCH_PATTERN(p, s, r) \ @@ -222,7 +222,7 @@ TEST_MATCH_PATTERN("AB", "a", FALSE); } -void test_matchCommand() { +static void test_matchCommand() { scpi_bool_t result; #define TEST_MATCH_COMMAND(p, s, r) \ -- Gitblit v1.9.1