summary refs log tree commit diff
path: root/man
diff options
context:
space:
mode:
authorZ. Liu <zhixu.liu@gmail.com>2024-08-28 14:45:12 +0800
committerGerrit Pape <pape@smarden.org>2024-09-25 22:22:00 +0000
commit0362e9f54bf72aa84d1850545a27da3af83448eb (patch)
treec8ee553c0a839bd549d1b11fc97fc9ec666b77b4 /man
parentbb30adfc42b9993a4523fbed9e674fdab5971220 (diff)
downloadrunit-0362e9f54bf72aa84d1850545a27da3af83448eb.tar.gz
runit-0362e9f54bf72aa84d1850545a27da3af83448eb.tar.xz
runit-0362e9f54bf72aa84d1850545a27da3af83448eb.zip
fix compilation errors(s)/warning(s) of x86_cpuid.c
found by using clang 18 with CFLAGS: -Wall

link of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches
  0029-fix-ftbfs-with-gcc14.patch

x86cpuid.c:7:3: error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    7 |   exit(1);
      |   ^
x86cpuid.c:34:7: error: call to undeclared function 'putchar'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   34 |       putchar(c);
      |       ^
x86cpuid.c:37:3: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   37 |   printf("-%08x-%08x\n",y[0],y[3]);
      |   ^
x86cpuid.c:37:25: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat]
   37 |   printf("-%08x-%08x\n",y[0],y[3]);
      |            ~~~~         ^~~~
      |            %08lx
x86cpuid.c:37:30: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat]
   37 |   printf("-%08x-%08x\n",y[0],y[3]);
      |                 ~~~~         ^~~~
      |                 %08lx

gcc report:
x86cpuid.c:7:3: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
x86cpuid.c:7:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
x86cpuid.c:34:7: warning: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
x86cpuid.c:37:3: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
x86cpuid.c:37:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
x86cpuid.c:37:15: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=]
x86cpuid.c:37:20: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions