From b3035563fdb6597354179093c7024639b9a7148e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 9 Jan 2024 17:43:43 -0500 Subject: Enable clang nullability checks --- NEWS | 6 ++++++ meson.build | 4 ++-- meson/suppressions/meson.build | 3 +-- src/sratom.c | 8 +++++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 1844f1c..36e3e0d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +sratom (0.6.17) unstable; urgency=medium + + * Enable clang nullability checks + + -- David Robillard Tue, 09 Jan 2024 22:42:39 +0000 + sratom (0.6.16) stable; urgency=medium * Clean up code diff --git a/meson.build b/meson.build index af9d5a3..d72af33 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -# Copyright 2021-2022 David Robillard +# Copyright 2021-2024 David Robillard # SPDX-License-Identifier: 0BSD OR ISC project( @@ -11,7 +11,7 @@ project( ], license: 'ISC', meson_version: '>= 0.56.0', - version: '0.6.16', + version: '0.6.17', ) sratom_src_root = meson.current_source_dir() diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build index 542b00e..85f3daa 100644 --- a/meson/suppressions/meson.build +++ b/meson/suppressions/meson.build @@ -1,4 +1,4 @@ -# Copyright 2020-2023 David Robillard +# Copyright 2020-2024 David Robillard # SPDX-License-Identifier: 0BSD OR ISC # Project-specific warning suppressions @@ -23,7 +23,6 @@ if cc.get_id() == 'clang' '-Wno-float-conversion', '-Wno-implicit-float-conversion', '-Wno-implicit-int-conversion', - '-Wno-nullable-to-nonnull-conversion', '-Wno-padded', '-Wno-shorten-64-to-32', '-Wno-sign-conversion', diff --git a/src/sratom.c b/src/sratom.c index 447abef..da6fae4 100644 --- a/src/sratom.c +++ b/src/sratom.c @@ -1,4 +1,4 @@ -// Copyright 2012-2021 David Robillard +// Copyright 2012-2024 David Robillard // SPDX-License-Identifier: ISC #include "sratom/sratom.h" @@ -107,7 +107,7 @@ sratom_set_sink(Sratom* sratom, serd_node_free(&sratom->base_uri); sratom->base_uri = serd_node_new_uri_from_string(USTR(base_uri), NULL, NULL); - serd_uri_parse(sratom->base_uri.buf, &sratom->base); + serd_uri_parse((const uint8_t*)sratom->base_uri.buf, &sratom->base); } sratom->write_statement = sink; sratom->end_anon = end_sink; @@ -801,7 +801,9 @@ read_node(Sratom* sratom, SerdNode rel = serd_node_new_relative_uri(&uri, &sratom->base, &sratom->base, NULL); - uint8_t* path = serd_file_uri_parse(rel.buf, NULL); + + uint8_t* const path = serd_file_uri_parse((const uint8_t*)rel.buf, NULL); + if (path) { lv2_atom_forge_path( forge, (const char*)path, strlen((const char*)path)); -- cgit v1.2.1