summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-04 21:02:42 +0200
committerDavid Robillard <d@drobilla.net>2018-09-04 21:02:42 +0200
commitbd57bc1edb6d8131a920bcc4f12d91457e2ca2ed (patch)
tree8cfdfb9c336aa991b21299e31c2106713add7f88
parent4b298e4c7fa74836d023726185dfb2325d675c51 (diff)
downloadlilv-bd57bc1edb6d8131a920bcc4f12d91457e2ca2ed.tar.gz
lilv-bd57bc1edb6d8131a920bcc4f12d91457e2ca2ed.tar.bz2
lilv-bd57bc1edb6d8131a920bcc4f12d91457e2ca2ed.zip
Fix GCC8 warnings
-rw-r--r--NEWS6
-rw-r--r--lilv/lilv.h2
-rw-r--r--test/lilv_test.c19
-rw-r--r--test/test.lv2/test.c2
-rw-r--r--wscript2
5 files changed, 20 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index e545386..5f02a5c 100644
--- a/NEWS
+++ b/NEWS
@@ -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;
diff --git a/wscript b/wscript
index 9f31202..57ef231 100644
--- a/wscript
+++ b/wscript
@@ -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