summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 71d2e21)
raw | patch | inline | side by side (parent: 71d2e21)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 5 Mar 2017 16:45:54 +0000 (17:45 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 5 Mar 2017 16:45:54 +0000 (17:45 +0100) |
CC src/ovs_stats_la-ovs_stats.lo
src/ovs_stats.c:158:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
static const iface_counter ovs_stats_counter_name_to_type(const char *counter) {
^~~~~~
src/ovs_stats.c:356:29: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < ports_num; i++)
~ ^ ~~~~~~~~~
src/ovs_stats.c:401:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:415:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:501:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:524:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:538:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_ARRAY(stats)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:558:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_ARRAY(ext_ids)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:684:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++)
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 warnings generated.
src/ovs_stats.c:158:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
static const iface_counter ovs_stats_counter_name_to_type(const char *counter) {
^~~~~~
src/ovs_stats.c:356:29: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < ports_num; i++)
~ ^ ~~~~~~~~~
src/ovs_stats.c:401:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:415:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:501:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:524:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:538:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_ARRAY(stats)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:558:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_ARRAY(ext_ids)->len; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ovs_stats.c:684:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++)
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 warnings generated.
src/ovs_stats.c | patch | blob | history |
diff --git a/src/ovs_stats.c b/src/ovs_stats.c
index 7a8db93b99b0cb8f2d8fa1a5a450e2891f80c984..7d775284fbea7b38e3b71798aa8a6786adf78ec2 100644 (file)
--- a/src/ovs_stats.c
+++ b/src/ovs_stats.c
YAJL_GET_ARRAY(br_ports->u.array.values[1])->values;
size_t ports_num = YAJL_GET_ARRAY(br_ports->u.array.values[1])->len;
- for (int i = 0; i < ports_num; i++)
+ for (size_t i = 0; i < ports_num; i++)
ovs_stats_new_port(
br, YAJL_GET_STRING(ports_arr[i]->u.array.values[1]));
} else
yajl_val bridges = yajl_tree_get(jupdates, path, yajl_t_object);
if (bridges && YAJL_IS_OBJECT(bridges)) {
- for (int i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
+ for (size_t i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
yajl_val bridge = YAJL_GET_OBJECT(bridges)->values[i];
ovs_stats_update_bridge(bridge);
}
yajl_val bridge;
if (bridges && YAJL_IS_OBJECT(bridges)) {
pthread_mutex_lock(&g_stats_lock);
- for (int i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
+ for (size_t i = 0; i < YAJL_GET_OBJECT(bridges)->len; i++) {
bridge = YAJL_GET_OBJECT(bridges)->values[i];
ovs_stats_del_bridge(bridge);
}
yajl_val ports = yajl_tree_get(jupdates, path, yajl_t_object);
yajl_val port;
if (ports && YAJL_IS_OBJECT(ports)) {
- for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
+ for (size_t i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
port = YAJL_GET_OBJECT(ports)->values[i];
ovs_stats_update_port(YAJL_GET_OBJECT(ports)->keys[i], port);
}
yajl_val ports = yajl_tree_get(jupdates, path, yajl_t_object);
pthread_mutex_lock(&g_stats_lock);
if (ports && YAJL_IS_OBJECT(ports))
- for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
+ for (size_t i = 0; i < YAJL_GET_OBJECT(ports)->len; i++) {
ovs_stats_del_port(YAJL_GET_OBJECT(ports)->keys[i]);
}
pthread_mutex_unlock(&g_stats_lock);
char *counter_name = NULL;
int64_t counter_value = 0;
if (stats && YAJL_IS_ARRAY(stats))
- for (int i = 0; i < YAJL_GET_ARRAY(stats)->len; i++) {
+ for (size_t i = 0; i < YAJL_GET_ARRAY(stats)->len; i++) {
stat = YAJL_GET_ARRAY(stats)->values[i];
counter_name = YAJL_GET_STRING(YAJL_GET_ARRAY(stat)->values[0]);
counter_index = ovs_stats_counter_name_to_type(counter_name);
@@ -555,7 +555,7 @@ static int ovs_stats_update_iface_ext_ids(port_list_t *port, yajl_val ext_ids) {
char *value;
if (ext_ids && YAJL_IS_ARRAY(ext_ids))
- for (int i = 0; i < YAJL_GET_ARRAY(ext_ids)->len; i++) {
+ for (size_t i = 0; i < YAJL_GET_ARRAY(ext_ids)->len; i++) {
ext_id = YAJL_GET_ARRAY(ext_ids)->values[i];
key = YAJL_GET_STRING(YAJL_GET_ARRAY(ext_id)->values[0]);
value = YAJL_GET_STRING(YAJL_GET_ARRAY(ext_id)->values[1]);
yajl_val ports = yajl_tree_get(jupdates, path, yajl_t_object);
pthread_mutex_lock(&g_stats_lock);
if (ports && YAJL_IS_OBJECT(ports))
- for (int i = 0; i < YAJL_GET_OBJECT(ports)->len; i++)
+ for (size_t i = 0; i < YAJL_GET_OBJECT(ports)->len; i++)
ovs_stats_update_iface(YAJL_GET_OBJECT(ports)->values[i]);
pthread_mutex_unlock(&g_stats_lock);
return;