diff options
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | lilv/lilv.h | 2 | ||||
-rw-r--r-- | test/lilv_test.c | 19 | ||||
-rw-r--r-- | test/test.lv2/test.c | 2 | ||||
-rw-r--r-- | wscript | 2 |
5 files changed, 20 insertions, 11 deletions
@@ -1,3 +1,9 @@ +lilv (0.24.5) unstable; + + * Fix GCC8 warnings + + -- David Robillard <d@drobilla.net> Tue, 04 Sep 2018 21:02:19 +0200 + lilv (0.24.4) stable; * Fix saving state when broken links are encountered diff --git a/lilv/lilv.h b/lilv/lilv.h index 64897a1..f709cf1 100644 --- a/lilv/lilv.h +++ b/lilv/lilv.h @@ -352,7 +352,7 @@ lilv_node_as_bool(const LilvNode* value); @endcode */ #define LILV_FOREACH(colltype, iter, collection) \ - for (LilvIter* (iter) = lilv_ ## colltype ## _begin(collection); \ + for (LilvIter* iter = lilv_ ## colltype ## _begin(collection); \ !lilv_ ## colltype ## _is_end(collection, iter); \ (iter) = lilv_ ## colltype ## _next(collection, iter)) diff --git a/test/lilv_test.c b/test/lilv_test.c index 0c48588..6b81cb1 100644 --- a/test/lilv_test.c +++ b/test/lilv_test.c @@ -58,10 +58,10 @@ # define SHLIB_EXT ".so" #endif -static char bundle_dir_name[TEST_PATH_MAX]; -static char bundle_dir_uri[TEST_PATH_MAX]; -static char manifest_name[TEST_PATH_MAX]; -static char content_name[TEST_PATH_MAX]; +static char bundle_dir_name[TEST_PATH_MAX + sizeof("/.lv2/lilv-test.lv2")]; +static char bundle_dir_uri[sizeof(bundle_dir_name) + sizeof("file:///")]; +static char manifest_name[sizeof(bundle_dir_name) + sizeof("/manifest.ttl")]; +static char content_name[sizeof(bundle_dir_name) + sizeof("plugin.ttl")]; static LilvWorld* world; @@ -79,13 +79,16 @@ delete_bundle(void) static void init_tests(void) { - snprintf(bundle_dir_name, TEST_PATH_MAX, "%s/.lv2/lilv-test.lv2", + snprintf(bundle_dir_name, strlen(bundle_dir_name), "%s/.lv2/lilv-test.lv2", getenv("HOME")); lilv_mkdir_p(bundle_dir_name); - snprintf(bundle_dir_uri, TEST_PATH_MAX, "file://%s/", bundle_dir_name); - snprintf(manifest_name, TEST_PATH_MAX, "%s/manifest.ttl", bundle_dir_name); - snprintf(content_name, TEST_PATH_MAX, "%s/plugin.ttl", bundle_dir_name); + snprintf(bundle_dir_uri, sizeof(bundle_dir_uri), "file://%s/", + bundle_dir_name); + snprintf(manifest_name, sizeof(manifest_name), "%s/manifest.ttl", + bundle_dir_name); + snprintf(content_name, sizeof(content_name), "%s/plugin.ttl", + bundle_dir_name); delete_bundle(); } diff --git a/test/test.lv2/test.c b/test/test.lv2/test.c index 30677f1..d16e4a9 100644 --- a/test/test.lv2/test.c +++ b/test/test.lv2/test.c @@ -101,7 +101,7 @@ instantiate(const LV2_Descriptor* descriptor, return NULL; } - strncpy(test->tmp_file_path, TMP_TEMPLATE, sizeof(TMP_TEMPLATE)); + strncpy(test->tmp_file_path, TMP_TEMPLATE, strlen(TMP_TEMPLATE) + 1); mkstemp(test->tmp_file_path); LV2_State_Make_Path* make_path = NULL; @@ -12,7 +12,7 @@ import waflib.Logs as Logs # major increment <=> incompatible changes # minor increment <=> compatible changes (additions) # micro increment <=> no interface changes -LILV_VERSION = '0.24.4' +LILV_VERSION = '0.24.5' LILV_MAJOR_VERSION = '0' # Mandatory waf variables |