Fossil SCM

pedantic upstream cson -Wall/-Werror fixes (unused static consts) for clang.

stephan 2015-11-13 10:00 trunk
Commit f5bed9ce54f87cf9325cbec36b252334fac86cd6
1 file changed +4 -11
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1478,11 +1478,11 @@
14781478
NULL/*cleanup*/\
14791479
}
14801480
/**
14811481
Empty-initialized cson_value_api object.
14821482
*/
1483
-static const cson_value_api cson_value_api_empty = cson_value_api_empty_m;
1483
+/*static const cson_value_api cson_value_api_empty = cson_value_api_empty_m;*/
14841484
14851485
14861486
typedef unsigned int cson_counter_t;
14871487
struct cson_value
14881488
{
@@ -1529,15 +1529,10 @@
15291529
15301530
15311531
/**
15321532
Empty-initialized cson_value object.
15331533
*/
1534
-#define cson_value_empty_m { &cson_value_api_empty/*api*/, NULL/*value*/, 0/*refcount*/ }
1535
-/**
1536
- Empty-initialized cson_value object.
1537
-*/
1538
-static const cson_value cson_value_empty = cson_value_empty_m;
15391534
const cson_parse_opt cson_parse_opt_empty = cson_parse_opt_empty_m;
15401535
const cson_output_opt cson_output_opt_empty = cson_output_opt_empty_m;
15411536
const cson_object_iterator cson_object_iterator_empty = cson_object_iterator_empty_m;
15421537
const cson_buffer cson_buffer_empty = cson_buffer_empty_m;
15431538
const cson_parse_info cson_parse_info_empty = cson_parse_info_empty_m;
@@ -1558,12 +1553,10 @@
15581553
static const cson_value_api cson_value_api_string = { CSON_TYPE_STRING, cson_value_destroy_zero_it };
15591554
static const cson_value_api cson_value_api_array = { CSON_TYPE_ARRAY, cson_value_destroy_array };
15601555
static const cson_value_api cson_value_api_object = { CSON_TYPE_OBJECT, cson_value_destroy_object };
15611556
15621557
static const cson_value cson_value_undef = { &cson_value_api_undef, NULL, 0 };
1563
-static const cson_value cson_value_null_empty = { &cson_value_api_null, NULL, 0 };
1564
-static const cson_value cson_value_bool_empty = { &cson_value_api_bool, NULL, 0 };
15651558
static const cson_value cson_value_integer_empty = { &cson_value_api_integer, NULL, 0 };
15661559
static const cson_value cson_value_double_empty = { &cson_value_api_double, NULL, 0 };
15671560
static const cson_value cson_value_string_empty = { &cson_value_api_string, NULL, 0 };
15681561
static const cson_value cson_value_array_empty = { &cson_value_api_array, NULL, 0 };
15691562
static const cson_value cson_value_object_empty = { &cson_value_api_object, NULL, 0 };
@@ -2118,11 +2111,11 @@
21182111
unsigned int count;
21192112
unsigned int alloced;
21202113
};
21212114
typedef struct cson_kvp_list cson_kvp_list;
21222115
#define cson_kvp_list_empty_m {NULL/*list*/,0/*count*/,0/*alloced*/}
2123
-static const cson_kvp_list cson_kvp_list_empty = cson_kvp_list_empty_m;
2116
+/*static const cson_kvp_list cson_kvp_list_empty = cson_kvp_list_empty_m;*/
21242117
21252118
struct cson_object
21262119
{
21272120
cson_kvp_list kvp;
21282121
};
@@ -2309,11 +2302,11 @@
23092302
? 1 : 0;
23102303
}
23112304
#define ISA(T,TID) char cson_value_is_##T( cson_value const * v ) { \
23122305
/*return (v && v->api) ? cson_value_is_a(v,CSON_TYPE_##TID) : 0;*/ \
23132306
return (v && (v->api == &cson_value_api_##T)) ? 1 : 0; \
2314
- } static const char bogusPlaceHolderForEmacsIndention##TID = CSON_TYPE_##TID
2307
+ } extern char bogusPlaceHolderForEmacsIndention##TID
23152308
ISA(null,NULL);
23162309
ISA(bool,BOOL);
23172310
ISA(integer,INTEGER);
23182311
ISA(double,DOUBLE);
23192312
ISA(string,STRING);
@@ -3887,11 +3880,11 @@
38873880
{
38883881
rc = cson_rc.RangeError;
38893882
break;
38903883
}
38913884
rc = f( state, ubuf, 6 );
3892
- }else{ /* encode as a UTF16 surrugate pair */
3885
+ }else{ /* encode as a UTF16 surrogate pair */
38933886
/* http://unicodebook.readthedocs.org/en/latest/unicode_encodings.html#surrogates */
38943887
ch -= 0x10000;
38953888
rc = sprintf(ubuf, "\\u%04x\\u%04x",
38963889
(0xd800 | (ch>>10)),
38973890
(0xdc00 | (ch & 0x3ff)));
38983891
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1478,11 +1478,11 @@
1478 NULL/*cleanup*/\
1479 }
1480 /**
1481 Empty-initialized cson_value_api object.
1482 */
1483 static const cson_value_api cson_value_api_empty = cson_value_api_empty_m;
1484
1485
1486 typedef unsigned int cson_counter_t;
1487 struct cson_value
1488 {
@@ -1529,15 +1529,10 @@
1529
1530
1531 /**
1532 Empty-initialized cson_value object.
1533 */
1534 #define cson_value_empty_m { &cson_value_api_empty/*api*/, NULL/*value*/, 0/*refcount*/ }
1535 /**
1536 Empty-initialized cson_value object.
1537 */
1538 static const cson_value cson_value_empty = cson_value_empty_m;
1539 const cson_parse_opt cson_parse_opt_empty = cson_parse_opt_empty_m;
1540 const cson_output_opt cson_output_opt_empty = cson_output_opt_empty_m;
1541 const cson_object_iterator cson_object_iterator_empty = cson_object_iterator_empty_m;
1542 const cson_buffer cson_buffer_empty = cson_buffer_empty_m;
1543 const cson_parse_info cson_parse_info_empty = cson_parse_info_empty_m;
@@ -1558,12 +1553,10 @@
1558 static const cson_value_api cson_value_api_string = { CSON_TYPE_STRING, cson_value_destroy_zero_it };
1559 static const cson_value_api cson_value_api_array = { CSON_TYPE_ARRAY, cson_value_destroy_array };
1560 static const cson_value_api cson_value_api_object = { CSON_TYPE_OBJECT, cson_value_destroy_object };
1561
1562 static const cson_value cson_value_undef = { &cson_value_api_undef, NULL, 0 };
1563 static const cson_value cson_value_null_empty = { &cson_value_api_null, NULL, 0 };
1564 static const cson_value cson_value_bool_empty = { &cson_value_api_bool, NULL, 0 };
1565 static const cson_value cson_value_integer_empty = { &cson_value_api_integer, NULL, 0 };
1566 static const cson_value cson_value_double_empty = { &cson_value_api_double, NULL, 0 };
1567 static const cson_value cson_value_string_empty = { &cson_value_api_string, NULL, 0 };
1568 static const cson_value cson_value_array_empty = { &cson_value_api_array, NULL, 0 };
1569 static const cson_value cson_value_object_empty = { &cson_value_api_object, NULL, 0 };
@@ -2118,11 +2111,11 @@
2118 unsigned int count;
2119 unsigned int alloced;
2120 };
2121 typedef struct cson_kvp_list cson_kvp_list;
2122 #define cson_kvp_list_empty_m {NULL/*list*/,0/*count*/,0/*alloced*/}
2123 static const cson_kvp_list cson_kvp_list_empty = cson_kvp_list_empty_m;
2124
2125 struct cson_object
2126 {
2127 cson_kvp_list kvp;
2128 };
@@ -2309,11 +2302,11 @@
2309 ? 1 : 0;
2310 }
2311 #define ISA(T,TID) char cson_value_is_##T( cson_value const * v ) { \
2312 /*return (v && v->api) ? cson_value_is_a(v,CSON_TYPE_##TID) : 0;*/ \
2313 return (v && (v->api == &cson_value_api_##T)) ? 1 : 0; \
2314 } static const char bogusPlaceHolderForEmacsIndention##TID = CSON_TYPE_##TID
2315 ISA(null,NULL);
2316 ISA(bool,BOOL);
2317 ISA(integer,INTEGER);
2318 ISA(double,DOUBLE);
2319 ISA(string,STRING);
@@ -3887,11 +3880,11 @@
3887 {
3888 rc = cson_rc.RangeError;
3889 break;
3890 }
3891 rc = f( state, ubuf, 6 );
3892 }else{ /* encode as a UTF16 surrugate pair */
3893 /* http://unicodebook.readthedocs.org/en/latest/unicode_encodings.html#surrogates */
3894 ch -= 0x10000;
3895 rc = sprintf(ubuf, "\\u%04x\\u%04x",
3896 (0xd800 | (ch>>10)),
3897 (0xdc00 | (ch & 0x3ff)));
3898
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1478,11 +1478,11 @@
1478 NULL/*cleanup*/\
1479 }
1480 /**
1481 Empty-initialized cson_value_api object.
1482 */
1483 /*static const cson_value_api cson_value_api_empty = cson_value_api_empty_m;*/
1484
1485
1486 typedef unsigned int cson_counter_t;
1487 struct cson_value
1488 {
@@ -1529,15 +1529,10 @@
1529
1530
1531 /**
1532 Empty-initialized cson_value object.
1533 */
 
 
 
 
 
1534 const cson_parse_opt cson_parse_opt_empty = cson_parse_opt_empty_m;
1535 const cson_output_opt cson_output_opt_empty = cson_output_opt_empty_m;
1536 const cson_object_iterator cson_object_iterator_empty = cson_object_iterator_empty_m;
1537 const cson_buffer cson_buffer_empty = cson_buffer_empty_m;
1538 const cson_parse_info cson_parse_info_empty = cson_parse_info_empty_m;
@@ -1558,12 +1553,10 @@
1553 static const cson_value_api cson_value_api_string = { CSON_TYPE_STRING, cson_value_destroy_zero_it };
1554 static const cson_value_api cson_value_api_array = { CSON_TYPE_ARRAY, cson_value_destroy_array };
1555 static const cson_value_api cson_value_api_object = { CSON_TYPE_OBJECT, cson_value_destroy_object };
1556
1557 static const cson_value cson_value_undef = { &cson_value_api_undef, NULL, 0 };
 
 
1558 static const cson_value cson_value_integer_empty = { &cson_value_api_integer, NULL, 0 };
1559 static const cson_value cson_value_double_empty = { &cson_value_api_double, NULL, 0 };
1560 static const cson_value cson_value_string_empty = { &cson_value_api_string, NULL, 0 };
1561 static const cson_value cson_value_array_empty = { &cson_value_api_array, NULL, 0 };
1562 static const cson_value cson_value_object_empty = { &cson_value_api_object, NULL, 0 };
@@ -2118,11 +2111,11 @@
2111 unsigned int count;
2112 unsigned int alloced;
2113 };
2114 typedef struct cson_kvp_list cson_kvp_list;
2115 #define cson_kvp_list_empty_m {NULL/*list*/,0/*count*/,0/*alloced*/}
2116 /*static const cson_kvp_list cson_kvp_list_empty = cson_kvp_list_empty_m;*/
2117
2118 struct cson_object
2119 {
2120 cson_kvp_list kvp;
2121 };
@@ -2309,11 +2302,11 @@
2302 ? 1 : 0;
2303 }
2304 #define ISA(T,TID) char cson_value_is_##T( cson_value const * v ) { \
2305 /*return (v && v->api) ? cson_value_is_a(v,CSON_TYPE_##TID) : 0;*/ \
2306 return (v && (v->api == &cson_value_api_##T)) ? 1 : 0; \
2307 } extern char bogusPlaceHolderForEmacsIndention##TID
2308 ISA(null,NULL);
2309 ISA(bool,BOOL);
2310 ISA(integer,INTEGER);
2311 ISA(double,DOUBLE);
2312 ISA(string,STRING);
@@ -3887,11 +3880,11 @@
3880 {
3881 rc = cson_rc.RangeError;
3882 break;
3883 }
3884 rc = f( state, ubuf, 6 );
3885 }else{ /* encode as a UTF16 surrogate pair */
3886 /* http://unicodebook.readthedocs.org/en/latest/unicode_encodings.html#surrogates */
3887 ch -= 0x10000;
3888 rc = sprintf(ubuf, "\\u%04x\\u%04x",
3889 (0xd800 | (ch>>10)),
3890 (0xdc00 | (ch & 0x3ff)));
3891

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button