From af8eddb15bcd521bee57132e2d054da327abc724 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 22 Jan 2015 15:56:12 +0200 Subject: [PATCH] unit/test-gatt: Fix warnings This fixes the following warning when compiling with cgcc: unit/test-gatt.c:631:15: warning: symbol 'read_data_1' was not declared. Should it be static? unit/test-gatt.c:633:24: warning: symbol 'test_read_1' was not declared. Should it be static? unit/test-gatt.c:641:24: warning: symbol 'test_read_2' was not declared. Should it be static? unit/test-gatt.c:647:24: warning: symbol 'test_read_3' was not declared. Should it be static? unit/test-gatt.c:653:24: warning: symbol 'test_read_4' was not declared. Should it be static? unit/test-gatt.c:1284:24: warning: symbol 'test_read_by_type_1' was not declared. Should it be static? unit/test-gatt.c:1292:24: warning: symbol 'test_read_by_type_2' was not declared. Should it be static? unit/test-gatt.c:1298:24: warning: symbol 'test_read_by_type_3' was not declared. Should it be static? unit/test-gatt.c:1304:24: warning: symbol 'test_read_by_type_4' was not declared. Should it be static? unit/test-gatt.c:1310:24: warning: symbol 'test_read_by_type_5' was not declared. Should it be static? unit/test-gatt.c:1316:24: warning: symbol 'test_read_by_type_6' was not declared. Should it be static? unit/test-gatt.c:1352:24: warning: symbol 'test_multiple_read_1' was not declared. Should it be static? unit/test-gatt.c:1360:24: warning: symbol 'test_multiple_read_2' was not declared. Should it be static? unit/test-gatt.c:1367:24: warning: symbol 'test_multiple_read_3' was not declared. Should it be static? unit/test-gatt.c:1374:24: warning: symbol 'test_multiple_read_4' was not declared. Should it be static? unit/test-gatt.c:1381:24: warning: symbol 'test_multiple_read_5' was not declared. Should it be static? unit/test-gatt.c:1388:24: warning: symbol 'test_multiple_read_6' was not declared. Should it be static? --- unit/test-gatt.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/unit/test-gatt.c b/unit/test-gatt.c index cd6a6166e..98783fde4 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -628,9 +628,9 @@ static void test_read(struct context *context) test_read_cb, context, NULL)); } -const uint8_t read_data_1[] = {0x01, 0x02, 0x03}; +static const uint8_t read_data_1[] = {0x01, 0x02, 0x03}; -const struct test_step test_read_1 = { +static const struct test_step test_read_1 = { .handle = 0x0003, .func = test_read, .expected_att_ecode = 0, @@ -638,19 +638,19 @@ const struct test_step test_read_1 = { .length = 0x03 }; -const struct test_step test_read_2 = { +static const struct test_step test_read_2 = { .handle = 0x0000, .func = test_read, .expected_att_ecode = 0x01, }; -const struct test_step test_read_3 = { +static const struct test_step test_read_3 = { .handle = 0x0003, .func = test_read, .expected_att_ecode = 0x02, }; -const struct test_step test_read_4 = { +static const struct test_step test_read_4 = { .handle = 0x0003, .func = test_read, .expected_att_ecode = 0x08, @@ -1281,7 +1281,7 @@ static void test_search_descs(gconstpointer data) execute_context(context); } -const struct test_step test_read_by_type_1 = { +static const struct test_step test_read_by_type_1 = { .handle = 0x0001, .end_handle = 0xffff, .expected_att_ecode = 0x0a, @@ -1289,31 +1289,31 @@ const struct test_step test_read_by_type_1 = { .length = 0x03 }; -const struct test_step test_read_by_type_2 = { +static const struct test_step test_read_by_type_2 = { .handle = 0x0001, .end_handle = 0xffff, .expected_att_ecode = 0x02, }; -const struct test_step test_read_by_type_3 = { +static const struct test_step test_read_by_type_3 = { .handle = 0x0001, .end_handle = 0xffff, .expected_att_ecode = 0x0a, }; -const struct test_step test_read_by_type_4 = { +static const struct test_step test_read_by_type_4 = { .handle = 0x0001, .end_handle = 0xffff, .expected_att_ecode = 0x08, }; -const struct test_step test_read_by_type_5 = { +static const struct test_step test_read_by_type_5 = { .handle = 0x0001, .end_handle = 0xffff, .expected_att_ecode = 0x05, }; -const struct test_step test_read_by_type_6 = { +static const struct test_step test_read_by_type_6 = { .handle = 0x0001, .end_handle = 0xffff, .expected_att_ecode = 0x0c, @@ -1349,7 +1349,7 @@ static void test_multiple_read(struct context *context) NULL)); } -const struct test_step test_multiple_read_1 = { +static const struct test_step test_multiple_read_1 = { .handle = 0x0003, .end_handle = 0x0007, .func = test_multiple_read, @@ -1357,35 +1357,35 @@ const struct test_step test_multiple_read_1 = { .length = 0x03 }; -const struct test_step test_multiple_read_2 = { +static const struct test_step test_multiple_read_2 = { .handle = 0x0003, .end_handle = 0x0007, .func = test_multiple_read, .expected_att_ecode = 0x02 }; -const struct test_step test_multiple_read_3 = { +static const struct test_step test_multiple_read_3 = { .handle = 0x0003, .end_handle = 0x0007, .func = test_multiple_read, .expected_att_ecode = 0x01 }; -const struct test_step test_multiple_read_4 = { +static const struct test_step test_multiple_read_4 = { .handle = 0x0003, .end_handle = 0x0007, .func = test_multiple_read, .expected_att_ecode = 0x08 }; -const struct test_step test_multiple_read_5 = { +static const struct test_step test_multiple_read_5 = { .handle = 0x0003, .end_handle = 0x0007, .func = test_multiple_read, .expected_att_ecode = 0x05 }; -const struct test_step test_multiple_read_6 = { +static const struct test_step test_multiple_read_6 = { .handle = 0x0003, .end_handle = 0x0007, .func = test_multiple_read, -- 2.47.3