tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH] Small fixes for macppc-powerpc{,64} in fixcoff.c



Hi!

This is almost the last patch for getting up with very new GCC + GNU
libc combinations:

[bld tls 2024-10-19 14:30:05] echo '#  ' "compile " macppc-fixcoff/fixcoff.lo
[bld tls 2024-10-19 14:30:05] + echo #   compile  macppc-fixcoff/fixcoff.lo
[bld tls 2024-10-19 14:30:05] #   compile  macppc-fixcoff/fixcoff.lo
[bld tls 2024-10-19 14:30:05] cc -O   -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/tools-macppc-powerpc/include/compat -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o fixcoff.lo.o    /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c
[bld tls 2024-10-19 14:30:05] + cc -O -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/tools-macppc-powerpc/include/compat -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o fixcoff.lo.o /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c
[bld tls 2024-10-19 14:30:05] /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c:124:1: error: return type defaults to 'int' [-Wimplicit-int]
[bld tls 2024-10-19 14:30:05]   124 | main(int argc, char * const *argv)
[bld tls 2024-10-19 14:30:05]       | ^~~~
[bld tls 2024-10-19 14:30:05] /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c: In function 'main':
[bld tls 2024-10-19 14:30:05] /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c:134:22: warning: passing argument 1 of 'help' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
[bld tls 2024-10-19 14:30:05]   134 |                 help(getprogname());
[bld tls 2024-10-19 14:30:05]       |                      ^~~~~~~~~~~~~
[bld tls 2024-10-19 14:30:05] /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c:115:12: note: expected 'char *' but argument is of type 'const char *'
[bld tls 2024-10-19 14:30:05]   115 | help(char *prog)
[bld tls 2024-10-19 14:30:05]       |      ~~~~~~^~~~
[bld tls 2024-10-19 14:30:05] /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c:141:23: warning: passing argument 1 of 'usage' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
[bld tls 2024-10-19 14:30:05]   141 |                 usage(getprogname());
[bld tls 2024-10-19 14:30:05]       |                       ^~~~~~~~~~~~~
[bld tls 2024-10-19 14:30:05] /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c:109:13: note: expected 'char *' but argument is of type 'const char *'
[bld tls 2024-10-19 14:30:05]   109 | usage(char *prog)
[bld tls 2024-10-19 14:30:05]       |       ~~~~~~^~~~
[bld tls 2024-10-19 14:30:05] 
[bld tls 2024-10-19 14:30:05] *** Failed target:  fixcoff.lo
[bld tls 2024-10-19 14:30:05] *** Failed command: cc -O -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/tools-macppc-powerpc/include/compat -I/var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o fixcoff.lo.o /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff/../../sys/arch/macppc/stand/fixcoff/fixcoff.c
[bld tls 2024-10-19 14:30:05] *** Error code 1
[bld tls 2024-10-19 14:30:05] 
[bld tls 2024-10-19 14:30:05] Stop.
[bld tls 2024-10-19 14:30:05] nbmake[3]: stopped making "realall" in /var/lib/laminar/run/netbsd-macppc-powerpc/42/NetBSD-src/tools/macppc-fixcoff



diff --git a/sys/arch/macppc/stand/fixcoff/fixcoff.c b/sys/arch/macppc/stand/fixcoff/fixcoff.c
index c0f96f0bb845..a7a90167b6e4 100644
--- a/sys/arch/macppc/stand/fixcoff/fixcoff.c
+++ b/sys/arch/macppc/stand/fixcoff/fixcoff.c
@@ -106,13 +106,13 @@ struct aouthdr {
 #define RS6K_AOUTHDR_ZMAGIC     0x010B
 
 void
-usage(char *prog)
+usage(const char *prog)
 {
 	fprintf(stderr, "Usage: %s [-h] | [<file to fix>]\n", prog);
 }
 
 void
-help(char *prog)
+help(const char *prog)
 {
 	fprintf(stderr, "%s\tis designed to fix the xcoff headers in a\n",prog);
 	fprintf(stderr,
@@ -121,6 +121,7 @@ help(char *prog)
 	exit(0);
 }
 
+int
 main(int argc, char * const *argv)
 {
 	int	fd, i, n, ch;


Thanks,
  Jan-Benedict
-- 

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index