All of lore.kernel.org
 help / color / mirror / Atom feed
* selftests: arm64: sve-ptrace.c:85:40: warning: data argument not used by format string [-Wformat-extra-args]
@ 2024-04-18 12:31 ` Naresh Kamboju
  0 siblings, 0 replies; 2+ messages in thread
From: Naresh Kamboju @ 2024-04-18 12:31 UTC (permalink / raw)
  To: open list:KERNEL SELFTEST FRAMEWORK, Linux ARM, open list,
	lkft-triage, Linux Regressions
  Cc: Mark Brown, Catalin Marinas, Arnd Bergmann, Anders Roxell, Dan Carpenter

The Linux next building selftests with clang-17 and gcc-13 found these
build warnings.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build log:
---------
PATH:
selftests/arm64/fp
The reported build warnings noticed on following test files.
  * sve-ptrace.c
  * za-ptrace.c
  * zt-ptrace.c

clang-17 warnings:
-----
sve-ptrace.c:85:40: warning: data argument not used by format string
[-Wformat-extra-args]
   85 |                 ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
      |                                    ~~~~~~~~~~~~~~~~  ^
sve-ptrace.c:88:40: warning: data argument not used by format string
[-Wformat-extra-args]
   88 |                 ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
      |                                    ~~~~~~~~~~~~~~~~  ^
sve-ptrace.c:344:11: warning: format specifies type 'int' but the
argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  343 |                 ksft_test_result_fail("Error allocating %d
byte buffer for %s VL %u\n",
      |                                                         ~~
      |                                                         %zu
  344 |                                       data_size, type->name, vl);
      |                                       ^~~~~~~~~
and more

Gcc-13 warnings:
------
sve-ptrace.c: In function 'do_child':
sve-ptrace.c:85:36: warning: too many arguments for format [-Wformat-extra-args]
   85 |                 ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
      |                                    ^~~~~~~~~~~~~~~~
sve-ptrace.c:88:36: warning: too many arguments for format [-Wformat-extra-args]
   88 |                 ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
      |                                    ^~~~~~~~~~~~~~~~
sve-ptrace.c: In function 'ptrace_set_sve_get_sve_data':
sve-ptrace.c:343:58: warning: format '%d' expects argument of type
'int', but argument 2 has type 'size_t' {aka 'long unsigned int'}
[-Wformat=]
  343 |                 ksft_test_result_fail("Error allocating %d
byte buffer for %s VL %u\n",
      |                                                         ~^
      |                                                          |
      |                                                          int
      |                                                         %ld
  344 |                                       data_size, type->name, vl);
      |                                       ~~~~~~~~~
      |                                       |
      |                                       size_t {aka long unsigned int}
and more

Steps to reproduce:
---
tuxmake --runtime podman --target-arch arm64 --toolchain clang-nightly \
  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3nAXzFH2GOEle3S3MVC53A9/config
\
  LLVM=1 LLVM_IAS=1 debugkernel dtbs dtbs-legacy headers kernel
kselftest modules


tuxmake --runtime podman --target-arch arm64 --toolchain gcc-13 \
  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/config
\
  debugkernel dtbs dtbs-legacy headers kernel kselftest modules

Links:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3nAXzFH2GOEle3S3MVC53A9/
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* selftests: arm64: sve-ptrace.c:85:40: warning: data argument not used by format string [-Wformat-extra-args]
@ 2024-04-18 12:31 ` Naresh Kamboju
  0 siblings, 0 replies; 2+ messages in thread
From: Naresh Kamboju @ 2024-04-18 12:31 UTC (permalink / raw)
  To: open list:KERNEL SELFTEST FRAMEWORK, Linux ARM, open list,
	lkft-triage, Linux Regressions
  Cc: Mark Brown, Catalin Marinas, Arnd Bergmann, Anders Roxell, Dan Carpenter

The Linux next building selftests with clang-17 and gcc-13 found these
build warnings.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build log:
---------
PATH:
selftests/arm64/fp
The reported build warnings noticed on following test files.
  * sve-ptrace.c
  * za-ptrace.c
  * zt-ptrace.c

clang-17 warnings:
-----
sve-ptrace.c:85:40: warning: data argument not used by format string
[-Wformat-extra-args]
   85 |                 ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
      |                                    ~~~~~~~~~~~~~~~~  ^
sve-ptrace.c:88:40: warning: data argument not used by format string
[-Wformat-extra-args]
   88 |                 ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
      |                                    ~~~~~~~~~~~~~~~~  ^
sve-ptrace.c:344:11: warning: format specifies type 'int' but the
argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  343 |                 ksft_test_result_fail("Error allocating %d
byte buffer for %s VL %u\n",
      |                                                         ~~
      |                                                         %zu
  344 |                                       data_size, type->name, vl);
      |                                       ^~~~~~~~~
and more

Gcc-13 warnings:
------
sve-ptrace.c: In function 'do_child':
sve-ptrace.c:85:36: warning: too many arguments for format [-Wformat-extra-args]
   85 |                 ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
      |                                    ^~~~~~~~~~~~~~~~
sve-ptrace.c:88:36: warning: too many arguments for format [-Wformat-extra-args]
   88 |                 ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
      |                                    ^~~~~~~~~~~~~~~~
sve-ptrace.c: In function 'ptrace_set_sve_get_sve_data':
sve-ptrace.c:343:58: warning: format '%d' expects argument of type
'int', but argument 2 has type 'size_t' {aka 'long unsigned int'}
[-Wformat=]
  343 |                 ksft_test_result_fail("Error allocating %d
byte buffer for %s VL %u\n",
      |                                                         ~^
      |                                                          |
      |                                                          int
      |                                                         %ld
  344 |                                       data_size, type->name, vl);
      |                                       ~~~~~~~~~
      |                                       |
      |                                       size_t {aka long unsigned int}
and more

Steps to reproduce:
---
tuxmake --runtime podman --target-arch arm64 --toolchain clang-nightly \
  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3nAXzFH2GOEle3S3MVC53A9/config
\
  LLVM=1 LLVM_IAS=1 debugkernel dtbs dtbs-legacy headers kernel
kselftest modules


tuxmake --runtime podman --target-arch arm64 --toolchain gcc-13 \
  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/config
\
  debugkernel dtbs dtbs-legacy headers kernel kselftest modules

Links:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3nAXzFH2GOEle3S3MVC53A9/
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/

--
Linaro LKFT
https://lkft.linaro.org

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-18 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 12:31 selftests: arm64: sve-ptrace.c:85:40: warning: data argument not used by format string [-Wformat-extra-args] Naresh Kamboju
2024-04-18 12:31 ` Naresh Kamboju

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.