diff options
-rw-r--r-- | .clang-tidy | 3 | ||||
-rw-r--r-- | .gitignore | 12 | ||||
-rw-r--r-- | .reuse/dep5 | 2 | ||||
-rw-r--r-- | COPYING | 2 | ||||
-rw-r--r--[l---------] | LICENSES/ISC.txt | 14 | ||||
-rw-r--r-- | NEWS | 13 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/sord_validate.1 | 6 | ||||
-rw-r--r-- | doc/sordi.1 | 6 | ||||
-rw-r--r-- | include/sord/sordmm.hpp | 2 | ||||
-rw-r--r-- | meson.build | 10 | ||||
-rw-r--r-- | src/sord.c | 5 | ||||
-rw-r--r-- | src/sord_config.h | 2 | ||||
-rw-r--r-- | test/headers/.clang-tidy | 15 | ||||
-rw-r--r-- | test/headers/meson.build | 31 | ||||
-rw-r--r-- | test/headers/test_headers.c | 13 | ||||
-rw-r--r-- | test/meson.build | 8 |
17 files changed, 118 insertions, 27 deletions
diff --git a/.clang-tidy b/.clang-tidy index 836ccfb..e9c29d2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -# Copyright 2020-2024 David Robillard <d@drobilla.net> +# Copyright 2020-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC Checks: > @@ -32,6 +32,7 @@ Checks: > -clang-analyzer-core.uninitialized.ArraySubscript, -clang-analyzer-optin.core.EnumCastOutOfRange, -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling, + -clang-analyzer-unix.Malloc, -clang-analyzer-valist.Uninitialized, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-macro-usage, @@ -1,6 +1,10 @@ -# Copyright 2019-2021 David Robillard <d@drobilla.net> +# Copyright 2019-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC -build/** -__pycache__ -.meson-subproject-wrap-hash.txt +/.meson-subproject-wrap-hash.txt +/build/ +/subprojects/packagecache/ +/subprojects/sphinxygen-1.0.10/ +/subprojects/sphinxygen/ + +__pycache__/ diff --git a/.reuse/dep5 b/.reuse/dep5 index af3244f..1b32d67 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -9,7 +9,7 @@ Comment: Standard test suites from the W3C (only required for testing) License: BSD-3-Clause Files: AUTHORS NEWS -Copyright: 2011-2022 David Robillard <d@drobilla.net> +Copyright: 2011-2025 David Robillard <d@drobilla.net> Comment: Contributed to the Commons as a representation of simple facts License: 0BSD OR ISC @@ -1,4 +1,4 @@ -Copyright 2011-2022 David Robillard <d@drobilla.net> +Copyright 2011-2025 David Robillard <d@drobilla.net> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/LICENSES/ISC.txt b/LICENSES/ISC.txt index 012065c..d16d277 120000..100644 --- a/LICENSES/ISC.txt +++ b/LICENSES/ISC.txt @@ -1 +1,13 @@ -../COPYING
\ No newline at end of file +Copyright 2011-2025 David Robillard <d@drobilla.net> + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. @@ -1,4 +1,11 @@ -sord (0.16.17) unstable; urgency=medium +sord (0.16.19) unstable; urgency=medium + + * Add header warnings test + * Update man pages + + -- David Robillard <d@drobilla.net> Fri, 31 Jan 2025 02:01:55 +0000 + +sord (0.16.18) stable; urgency=medium * Add option to install tool man pages * Enable clang nullability checks @@ -6,7 +13,7 @@ sord (0.16.17) unstable; urgency=medium * Fix library current_version on MacOS * Replace more platform-specific code with use of zix - -- David Robillard <d@drobilla.net> Wed, 11 Dec 2024 20:13:16 +0000 + -- David Robillard <d@drobilla.net> Sun, 19 Jan 2025 13:46:35 +0000 sord (0.16.16) stable; urgency=medium @@ -82,7 +89,7 @@ sord (0.16.0) stable; urgency=medium * Return error from sord_inserter_write_statement() if a node can not be written (e.g. undefined prefix) * Safely return NULL from sord_iter_get() for end iterators - * sord_validate: Do proper numeric comparison for propery bounds checking + * sord_validate: Do proper numeric comparison for property bounds checking * sord_validate: Tolerate xsd:decimal literals for double and float properties if literals match pattern @@ -5,6 +5,7 @@ Sord ==== Sord is a lightweight C library for storing RDF statements in memory. + For more information, see <http://drobilla.net/software/sord>. -- David Robillard <d@drobilla.net> diff --git a/doc/sord_validate.1 b/doc/sord_validate.1 index d120653..16923d8 100644 --- a/doc/sord_validate.1 +++ b/doc/sord_validate.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2012-2022 David Robillard <d@drobilla.net> +.\" # Copyright 2012-2025 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC -.Dd Nov 29, 2022 +.Dd January 20, 2025 .Dt SORD_VALIDATE 1 -.Os Sord 0.30.17 +.Os .Sh NAME .Nm sord_validate .Nd validate RDF data diff --git a/doc/sordi.1 b/doc/sordi.1 index df0ab61..662fc7d 100644 --- a/doc/sordi.1 +++ b/doc/sordi.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2011-2022 David Robillard <d@drobilla.net> +.\" # Copyright 2011-2025 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC -.Dd Nov 29, 2022 +.Dd January 20, 2025 .Dt SORDI 1 -.Os Sord 0.30.17 +.Os .Sh NAME .Nm sordi .Nd load and rewrite RDF data diff --git a/include/sord/sordmm.hpp b/include/sord/sordmm.hpp index b1226d6..3a7c0ea 100644 --- a/include/sord/sordmm.hpp +++ b/include/sord/sordmm.hpp @@ -92,7 +92,7 @@ public: serd_env_set_prefix(_c_obj, &name_node, &uri_node); } - inline std::string qualify(std::string uri) const + inline std::string qualify(const std::string& uri) const { const SerdNode uri_node = string_to_node(SERD_URI, uri); SerdNode prefix; diff --git a/meson.build b/meson.build index 0c7c9e6..d5efe3c 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -# Copyright 2021-2024 David Robillard <d@drobilla.net> +# Copyright 2021-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC project( @@ -11,7 +11,7 @@ project( ], license: 'ISC', meson_version: '>= 0.56.0', - version: '0.16.17', + version: '0.16.19', ) sord_src_root = meson.current_source_dir() @@ -136,8 +136,8 @@ c_suppressions = cc.get_supported_arguments(c_suppressions) m_dep = cc.find_library('m', required: false) -zix_dep = dependency('zix-0', version: '>= 0.4.0') -serd_dep = dependency('serd-0', version: '>= 0.30.10') +zix_dep = dependency('zix-0', include_type: 'system', version: '>= 0.4.0') +serd_dep = dependency('serd-0', include_type: 'system', version: '>= 0.30.10') ########################## # Platform Configuration # @@ -196,7 +196,7 @@ sord_dep = declare_dependency( link_with: libsord, ) -# Generage pkg-config file for external dependants +# Generate pkg-config file for external dependants pkg.generate( libsord, description: 'Lightweight C library for storing RDF in memory', @@ -635,8 +635,9 @@ sord_best_index(SordModel* sord, { const bool graph_search = (pat[TUP_G] != 0); - const unsigned sig = (pat[0] ? 1 : 0) * 0x100U + (pat[1] ? 1 : 0) * 0x010U + - (pat[2] ? 1 : 0) * 0x001U; + const unsigned sig = ((pat[0] ? 1 : 0) * 0x100U) + + ((pat[1] ? 1 : 0) * 0x010U) + + ((pat[2] ? 1 : 0) * 0x001U); SordOrder good[2] = {(SordOrder)-1, (SordOrder)-1}; diff --git a/src/sord_config.h b/src/sord_config.h index 6df5b85..bdc07c4 100644 --- a/src/sord_config.h +++ b/src/sord_config.h @@ -16,7 +16,7 @@ #define SORD_CONFIG_H // Define version unconditionally so a warning will catch a mismatch -#define SORD_VERSION "0.16.17" +#define SORD_VERSION "0.16.19" #if !defined(SORD_NO_DEFAULT_CONFIG) diff --git a/test/headers/.clang-tidy b/test/headers/.clang-tidy new file mode 100644 index 0000000..db2b212 --- /dev/null +++ b/test/headers/.clang-tidy @@ -0,0 +1,15 @@ +# Copyright 2020-2025 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR ISC + +Checks: > + *, + -altera-*, + -llvmlibc-*, +CheckOptions: + - key: readability-function-cognitive-complexity.Threshold + value: '0' + - key: readability-identifier-length.IgnoredParameterNames + value: '^(a)|(b)|(s)|(p)|(o)|(g)|(x)|(y)$' +WarningsAsErrors: '*' +HeaderFilterRegex: '.*' +FormatStyle: file diff --git a/test/headers/meson.build b/test/headers/meson.build new file mode 100644 index 0000000..47ff9df --- /dev/null +++ b/test/headers/meson.build @@ -0,0 +1,31 @@ +# Copyright 2020-2025 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR ISC + +header_c_suppressions = [] + +if get_option('warning_level') == 'everything' + if cc.get_id() == 'clang' + if not meson.is_cross_build() + header_c_suppressions += ['-Wno-poison-system-directories'] + endif + elif cc.get_id() == 'msvc' + header_c_suppressions += [ + '/wd4820', # padding added after construct + ] + endif +endif + +if cc.get_id() == 'clang' + header_c_suppressions += ['-Wno-nullability-extension'] +endif + +test( + 'headers', + executable( + 'test_headers', + files('test_headers.c'), + c_args: header_c_suppressions, + dependencies: sord_dep, + ), + suite: 'unit', +) diff --git a/test/headers/test_headers.c b/test/headers/test_headers.c new file mode 100644 index 0000000..ccd936e --- /dev/null +++ b/test/headers/test_headers.c @@ -0,0 +1,13 @@ +// Copyright 2022-2025 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#include <sord/sord.h> // IWYU pragma: keep + +#if defined(__GNUC__) +__attribute__((const)) +#endif +int +main(void) +{ + return 0; +} diff --git a/test/meson.build b/test/meson.build index cf8bcc4..8a26004 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,6 +1,12 @@ -# Copyright 2021-2022 David Robillard <d@drobilla.net> +# Copyright 2021-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC +################### +# Header Warnings # +################### + +subdir('headers') + #################### # Project Metadata # #################### |