Skip to content

Compiler warning causes build to fail under Clang #478

@capezotte

Description

@capezotte
The Meson build system
Version: 0.61.1
Source dir: /home/carlos/Build/bubblewrap
Build dir: /home/carlos/Build/bubblewrap/build
Build type: native build
Project name: bubblewrap
Project version: 0.6.1
C compiler for the host machine: clang (clang 13.0.1 "clang version 13.0.1")
C linker for the host machine: clang ld.lld 13.0.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Werror=shadow: YES 
Compiler for C supports arguments -Werror=empty-body: YES 
Compiler for C supports arguments -Werror=strict-prototypes: YES 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=implicit-function-declaration: YES 
Compiler for C supports arguments -Werror=pointer-arith: YES 
Compiler for C supports arguments -Werror=init-self: YES 
Compiler for C supports arguments -Werror=missing-declarations: YES 
Compiler for C supports arguments -Werror=return-type: YES 
Compiler for C supports arguments -Werror=overflow: YES 
Compiler for C supports arguments -Werror=int-conversion: YES 
Compiler for C supports arguments -Werror=parenthesis: NO 
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES 
Compiler for C supports arguments -Werror=misleading-indentation: YES 
Compiler for C supports arguments -Werror=missing-include-dirs: YES 
Compiler for C supports arguments -Werror=aggregate-return: YES 
Compiler for C supports arguments -Werror=switch-default: YES 
Compiler for C supports arguments -Wswitch-enum: YES 
Compiler for C supports arguments -Wno-sign-compare: YES 
Compiler for C supports arguments -Wno-error=sign-compare: YES 
Compiler for C supports arguments -Wno-missing-field-initializers: YES 
Compiler for C supports arguments -Wno-error=missing-field-initializers: YES 
Compiler for C supports arguments -Werror=format=2: YES 
Compiler for C supports arguments -Werror=format-security: YES 
Compiler for C supports arguments -Werror=format-nonliteral: YES 
Program bash found: YES (/bin/bash)
Program python3 found: YES (/usr/bin/python3)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency libcap found: YES 2.63
Found CMake: /usr/bin/cmake (3.22.2)
Run-time dependency libselinux found: NO (tried pkgconfig and cmake)
Configuring config.h using configuration
Program xsltproc found: YES (/usr/bin/xsltproc)
Run-time dependency bash-completion found: YES 2.11
Build targets in project: 4

Found ninja-1.9 at /usr/bin/ninja
ninja: entering directory '/home/carlos/Build/bubblewrap/build'                                     
[1/11] Compiling C object tests/try-syscall.p/try-syscall.c.o
[2/11] Linking target tests/try-syscall
[3/11] Compiling C object tests/test-utils.p/.._utils.c.o
../utils.c:85:37: warning: unused parameter 'label' [-Wunused-parameter]
die_unless_label_valid (const char *label)
                                    ^
../utils.c:857:43: warning: unused parameter 'mount_label' [-Wunused-parameter]
label_mount (const char *opt, const char *mount_label)
                                          ^
../utils.c:874:32: warning: unused parameter 'file_label' [-Wunused-parameter]
label_create_file (const char *file_label)
                               ^
../utils.c:884:25: warning: unused parameter 'exec_label' [-Wunused-parameter]
label_exec (const char *exec_label)
                        ^
4 warnings generated.
[4/11] Compiling C object tests/test-utils.p/test-utils.c.o
ninja: job failed: clang -Itests/test-utils.p -Itests -I../tests -I. -I.. -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O0 -g -D_GNU_SOURCE -Werror=shadow -Werror=empty-body -Werror=strict-prototypes -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=missing-declarations -Werror=return-type -Werror=overflow -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -Werror=missing-include-dirs -Werror=aggregate-return -Werror=switch-default -Wswitch-enum -Wno-sign-compare -Wno-error=sign-compare -Wno-missing-field-initializers -Wno-error=missing-field-initializers -Werror=format=2 -Werror=format-security -Werror=format-nonliteral -MD -MQ tests/test-utils.p/test-utils.c.o -MF tests/test-utils.p/test-utils.c.o.d -o tests/test-utils.p/test-utils.c.o -c ../tests/test-utils.c
../tests/test-utils.c:35:12: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
  vprintf (format, ap);
           ^~~~~~
1 error generated.
ninja: subcommand failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions