Skip to content

Commit

Permalink
multimedia/vmaf: unbreak build with clang 15 after a57fa88
Browse files Browse the repository at this point in the history
../tools/cli_parse.c:194:21: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
    while ((key_val = strsep(&optarg_copy, ":")) != NULL) {
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:195:15: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
        char *key = strsep(&key_val, "=");
              ^     ~~~~~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:196:15: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
        char *val = strsep(&key_val, "=");
              ^     ~~~~~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:221:19: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
            char *name = strsep(&key, ".");
                  ^      ~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:223:19: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
            char *opt = strsep(&key, ".");
                  ^     ~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:240:30: warning: call to undeclared function 'strnlen'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    const size_t optarg_sz = strnlen(optarg, 1024);
                             ^
../tools/cli_parse.c:249:17: warning: call to undeclared function 'strsep'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        .name = strsep(&optarg_copy, "="),
                ^
../tools/cli_parse.c:249:17: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
        .name = strsep(&optarg_copy, "="),
                ^~~~~~~~~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:255:21: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
    while ((key_val = strsep(&optarg_copy, ":")) != NULL) {
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:256:21: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
        const char *key = strsep(&key_val, "=");
                    ^     ~~~~~~~~~~~~~~~~~~~~~
../tools/cli_parse.c:257:21: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
        const char *val = strsep(&key_val, "=");
                    ^     ~~~~~~~~~~~~~~~~~~~~~

Reported by:	Michael Butler
  • Loading branch information
jbeich committed Nov 21, 2023
1 parent f40fc72 commit 2cf7924
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions multimedia/vmaf/Makefile
@@ -1,6 +1,7 @@
PORTNAME= vmaf
DISTVERSIONPREFIX= v
DISTVERSION= 3.0.0-rc
PORTREVISION= 1
CATEGORIES= multimedia

MAINTAINER= jbeich@FreeBSD.org
Expand Down
22 changes: 22 additions & 0 deletions multimedia/vmaf/files/patch-meson.build
@@ -0,0 +1,22 @@
../src/feature/feature_collector.c:72:36: error: call to undeclared function 'strnlen'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
72 | const size_t feature_name_sz = strnlen(feature_name, 2048);
| ^
../src/feature/feature_name.c:34:24: error: call to undeclared function 'strnlen'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
34 | const size_t len = strnlen(buf, buf_sz);
| ^
../tools/cli_parse.c:194:21: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
while ((key_val = strsep(&optarg_copy, ":")) != NULL) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~

--- meson.build.orig 2023-11-20 19:15:15 UTC
+++ meson.build
@@ -26,9 +26,6 @@ elif host_machine.system() == 'darwin'
elif host_machine.system() == 'darwin'
test_args += '-D_DARWIN_C_SOURCE'
add_project_arguments('-D_DARWIN_C_SOURCE', language: 'c')
-else
- test_args += '-D_XOPEN_SOURCE=600'
- add_project_arguments('-D_XOPEN_SOURCE=600', language: 'c')
endif

# Header checks

0 comments on commit 2cf7924

Please sign in to comment.