LP#1243841 - Quiet additional Make warnings and some code cleanup.
authorJason Stephenson <jason@sigio.com>
Tue, 7 Nov 2017 20:58:05 +0000 (15:58 -0500)
committerJason Stephenson <jason@sigio.com>
Tue, 7 Nov 2017 20:58:05 +0000 (15:58 -0500)
commit8c1dd779aa0d954cee813dc251afb24cc0b51674
tree24d8f0c1b8b4c81b1413f3e70bd12257e05d7a2a
parent5ad89707dd2d276d89d46b391405ec68f8b6f8b5
LP#1243841 - Quiet additional Make warnings and some code cleanup.

We make the following warnings go away:

osrf_legacy_json.c:607:6: warning: variable ‘fourth_dash’ set but not used [-Wunused-but-set-variable]

osrf_legacy_json.c:836:5: warning: passing argument 3 of ‘makeNode’ discards ‘const’ qualifier from pointer target type [enabled by default]

utils.c:133:2: warning: format not a string literal and no format arguments [-Wformat-security]

We also cleanup the while block nested in a do while block around line
63 of osrf_cache.c to be more readable by adding braces and breaking
it across 3 lines.

Signed-off-by: Jason Stephenson <jason@sigio.com>
src/libopensrf/osrf_cache.c
src/libopensrf/osrf_legacy_json.c
src/libopensrf/utils.c