DragonFlyBSD/src 59b78e4sys/bus/firewire fwohci.c

fix(firewire): fix tcode switch fallthrough on little-endian

The break statements in fwohci_arcv_swap() were inside
#if BYTE_ORDER == BIG_ENDIAN guards, causing all cases to fall
through to the default "Unknown tcode" handler on little-endian
(x86) systems. This meant every received packet was dropped,
breaking bus manager election, split transactions, and all
asynchronous communication.

Move break statements outside the #if guards to match FreeBSD.
DeltaFile
+2-2sys/bus/firewire/fwohci.c
+2-21 files

DragonFlyBSD/src bff3c62usr.sbin/syslogd syslogd.c

fix(syslogd): check f_prevline content instead of array address

f_prevline is a char[] struct member, so its address is always
non-NULL. Check f_prevline[0] to test whether the previous line
buffer contains a message, matching the existing check at line 1010.
DeltaFile
+1-1usr.sbin/syslogd/syslogd.c
+1-11 files

DragonFlyBSD/src 555a82ausr.bin/kcollect kcollect.c

fix(kcollect): mark unused total_count parameter in dump_influxdb()

total_count is required by the function pointer signature but not
used in the influxdb output path. Mark it __unused and remove the
dead ++total_count increment.
DeltaFile
+1-2usr.bin/kcollect/kcollect.c
+1-21 files

DragonFlyBSD/src 3aa6009usr.sbin/iostat iostat.c

fix(iostat): remove unused tflag variable

tflag was set when -t was parsed but never checked; the -t option's
effect is handled entirely by buildmatch().
DeltaFile
+2-3usr.sbin/iostat/iostat.c
+2-31 files

DragonFlyBSD/src d1add8eusr.sbin/ac ac.c

fix(ac): remove unused rfound counter in ac()

rfound counted wtmpx records read but was never checked or printed.
DeltaFile
+1-3usr.sbin/ac/ac.c
+1-31 files

DragonFlyBSD/src 08e2850usr.bin/vmstat vmstat.c

fix(vmstat): remove unused zfreecnt_prev in dozmem()

zfreecnt_prev was accumulated from saved per-cpu zone stats but
never displayed. Only znalloc_prev is used for the delta output.
DeltaFile
+0-3usr.bin/vmstat/vmstat.c
+0-31 files

DragonFlyBSD/src e13731eusr.bin/diff diffreg.c

fix(diff): remove unused jackpot counter in check()

The jackpot variable tracked hash collision false-matches but was
only referenced in a commented-out debug fprintf. Remove the variable,
its increment, and the dead comment block.
DeltaFile
+3-11usr.bin/diff/diffreg.c
+3-111 files

DragonFlyBSD/src b415371sbin/ifconfig ifgroup.c

fix(ifconfig): remove unused cnt variable in printgroup()

The member count was incremented but never printed or returned.
DeltaFile
+1-2sbin/ifconfig/ifgroup.c
+1-21 files

DragonFlyBSD/src ea0bc3fsbin/growfs growfs.c

fix(growfs): remove unused dupper variable in updjcg()

dupper was computed from cgdmin() but never referenced in this
function. The other growfs functions that use dupper are unaffected.
DeltaFile
+1-6sbin/growfs/growfs.c
+1-61 files

DragonFlyBSD/src c6b55dclib/libfetch http.c

fix(libfetch): remove unused base64 length counter in http_base64()

The 'r' variable tracked output length but was never returned or
used. The function returns the NUL-terminated string directly.
DeltaFile
+2-5lib/libfetch/http.c
+2-51 files

DragonFlyBSD/src 4501ce5games/robots rnd_pos.c

fix(robots): remove dead call counter in rnd_pos()

The static 'call' variable was incremented but never read.
Likely a leftover debug counter.
DeltaFile
+0-2games/robots/rnd_pos.c
+0-21 files

DragonFlyBSD/src 8704f77games/monop print.c

fix(monop): remove unused rnt variable in printsq()

The railroad rent was computed into 'rnt' but never used; the printf
already calculates the same value inline via 25 << (num_rr - 1).
DeltaFile
+0-3games/monop/print.c
+0-31 files

DragonFlyBSD/src 171bcb4lib/libkvm kvm.c

fix(libkvm): return close() error status from kvm_close()

kvm_close() accumulated close() return values into 'error' via |=
but always returned 0, silently discarding close failures.
Return the accumulated error to match the function's int return type
and the kvm_close(3) manpage contract.
DeltaFile
+1-1lib/libkvm/kvm.c
+1-11 files

DragonFlyBSD/src c5cc81fsys/vfs/hammer2 hammer2_ioctl.c

hammer2: fix HAMMER2IOC_RECLUSTER ioctl failing on local mounts

iroot->cluster.focus is lazily set during I/O via hammer2_cluster_resolve
and is NULL at mount time, causing HAMMER2IOC_RECLUSTER to always fail with
EINVAL and log a misleading "not a local device mount" message.

Use cluster->focus->hmp when focus is set (priority), falling back to
array[0].chain->hmp for single-chain clusters where focus has not yet
been resolved. Remove the spurious diagnostic kprintfs.
DeltaFile
+11-7sys/vfs/hammer2/hammer2_ioctl.c
+11-71 files

DragonFlyBSD/src 7b7fb99lib/libnvmm libnvmm_x86.c

libnvmm: Revert unneeded '-Wdangling-pointer' #pragma diagnostic

The in-base GCC 12.5 does not give such warnings, so just revert this
unneeded #pragma hack added in commit
bdbecb468706b0d4afd30f9aeb119c342f6f4e29.

In addition, we don't really like such #pragma hacks all over the place;
better to identify the cause and fix the code or adjust the warning
flags to suppress false positives.
DeltaFile
+0-20lib/libnvmm/libnvmm_x86.c
+0-201 files

DragonFlyBSD/src 3346037lib/libc/iconv iconv.c

fix: iconv: move NULL checks before pointer arithmetic in iconvctl()

strchr() result was used in pointer arithmetic and incremented before
being checked for NULL. Move the guards above the strlcpy() call.
DeltaFile
+4-2lib/libc/iconv/iconv.c
+4-21 files

DragonFlyBSD/src b77d373lib/libtcplay safe_mem.c, sbin/cryptdisks safe_mem.c

tcplay/cryptdisks: Suppress GCC 15 false-positive -Wmaybe-uninitialized.

GCC 15 cannot see that mem is always initialized after the
malloc NULL check. Use a guarded diagnostic pragma to suppress
the warning only on GCC >= 15.
DeltaFile
+8-0lib/libtcplay/safe_mem.c
+8-0sbin/cryptdisks/safe_mem.c
+16-02 files

DragonFlyBSD/src bdbecb4games/adventure save.c, lib/libefivar uefi-dplib.h

various: Fix -Wstringop-overread and -Wdangling-pointer warnings.

Fix sizeof(&sum) vs sizeof(sum) bug in adventure save/restore.
Fix strcmp() on non-NUL-terminated fgetln() buffer in libfetch.
Suppress false positives in libefivar and libnvmm.
DeltaFile
+20-0lib/libnvmm/libnvmm_x86.c
+9-2lib/libefivar/uefi-dplib.h
+2-2lib/libfetch/http.c
+2-2games/adventure/save.c
+33-64 files

DragonFlyBSD/src 572db2blib/libc/gen setmode.c, usr.bin/rs rs.c

libc/rs: Fix use-after-free on realloc (-Wuse-after-free).

GCC 15 warns when pointer arithmetic references a pointer that was
passed to realloc(). Save the offset before the realloc call and
recompute the pointer from the new allocation afterwards.
DeltaFile
+5-3usr.bin/rs/rs.c
+3-3lib/libc/gen/setmode.c
+8-62 files

DragonFlyBSD/src 58a4a85lib/libc/iconv iconv.c, sys/kern kern_kinfo.c

various: Fix always-true/false address comparisons (-Waddress).

GCC 15 warns when comparing the address of a struct member against
NULL, since such addresses can never be NULL. Replace with emptiness
checks where intent was "is it set", remove dead guards otherwise.

Also fixes a latent bug in telnet ring.c where a pointer expression
was used as a boolean instead of as the RHS of a comparison.
DeltaFile
+2-4sys/kern/kern_kinfo.c
+2-2usr.sbin/ppp/ipcp.c
+2-2usr.sbin/pciconf/pciconf.c
+1-1usr.bin/telnet/ring.c
+1-1usr.sbin/keyserv/crypt_server.c
+1-1lib/libc/iconv/iconv.c
+9-115 files not shown
+14-1611 files

DragonFlyBSD/src ace1c17bin/test test.c, games/adventure save.c

various: Fix -Wunterminated-string-initialization warnings.

GCC 15 warns when a string literal exactly fills a char array,
truncating the NUL terminator. Extend arrays used as strings.
Use char array initializers for intentionally non-terminated arrays.
DeltaFile
+1-1usr.bin/m4/misc.c
+1-1bin/test/test.c
+1-1games/adventure/save.c
+1-1games/gomoku/main.c
+1-1lib/libfetch/common.c
+1-1lib/libthread_xu/thread/thr_printf.c
+6-61 files not shown
+7-77 files

DragonFlyBSD/src a1fbaa2sbin/rconfig rconfig.c, sbin/restore symtab.c

various: Swap transposed calloc() count/size arguments.

GCC 15 warns when calloc() is called with sizeof() as the first
argument and count as the second (-Wcalloc-transposed-args).
The correct prototype is calloc(count, size).
DeltaFile
+8-8usr.bin/localedef/collate.c
+5-5sbin/svc/remote.c
+3-3usr.bin/ministat/ministat.c
+1-1sbin/rconfig/rconfig.c
+1-1sbin/restore/symtab.c
+1-1sbin/svc/subs.c
+19-197 files not shown
+26-2613 files

DragonFlyBSD/src 3521325usr.bin/crunch/crunchgen crunchgen.c

crunchgen(1): Add missing prototypes for the _crunched_*_stub() functions.
DeltaFile
+2-1usr.bin/crunch/crunchgen/crunchgen.c
+2-11 files

DragonFlyBSD/src a811b50usr.sbin/cron/cron do_command.c cron.h, usr.sbin/cron/crontab crontab.c

cron(8)/crontab(1): Fix warnings and raise WARNS to 4.
DeltaFile
+1-49usr.sbin/cron/cron/do_command.c
+12-11usr.sbin/cron/crontab/crontab.c
+11-11usr.sbin/cron/cron/cron.h
+4-15usr.sbin/cron/lib/misc.c
+5-7usr.sbin/cron/cron/database.c
+3-4usr.sbin/cron/cron/cron.c
+36-974 files not shown
+40-10210 files

DragonFlyBSD/src fd12c5cusr.bin/bmake Makefile, usr.bin/mkstr Makefile

bmake(1)/mkstr(1): Raise WARNS to 6.
DeltaFile
+0-2usr.bin/bmake/Makefile
+0-2usr.bin/mkstr/Makefile
+0-42 files

DragonFlyBSD/src 32df2f8usr.bin/crunch Makefile.inc

crunchgen(1)/crunchide(1): Add missing .include in the top Makefile.inc.
DeltaFile
+2-0usr.bin/crunch/Makefile.inc
+2-01 files

DragonFlyBSD/src da44c6dbin/csh/csh Makefile, contrib/tcsh-6 tc.decls.h tc.alloc.c

csh(1): Fix further warnings and bump WARNS from 1 to 6.

* Remove unneeded malloc_usable_size() prototype (there is one
  in <stdlib.h>).

* ut_host is a member of struct utmpx, too, so expand the #ifdef for
  the prototypes for utmphost() and utmphostsize() accordingly.
DeltaFile
+0-8bin/csh/csh/Makefile
+1-1contrib/tcsh-6/tc.decls.h
+0-1contrib/tcsh-6/tc.alloc.c
+1-103 files

DragonFlyBSD/src ade414bbin/csh Makefile

csh(1): Add a newline in Makefile.
DeltaFile
+1-0bin/csh/Makefile
+1-01 files

DragonFlyBSD/src ed90992usr.bin/crunch/crunchgen crunchgen.c

fix: crunchgen: use proper prototype for _crunched_*_stub externs

GCC 15 treats incompatible pointer types as errors.
DeltaFile
+1-1usr.bin/crunch/crunchgen/crunchgen.c
+1-11 files

DragonFlyBSD/src a9be480contrib/tcsh-6 sh.decls.h

fix: tcsh: add missing exportpath() prototype to sh.decls.h

GCC 15 treats implicit function declarations as errors.
exportpath() is defined in sh.set.c but had no prototype,
causing a build failure with -Werror=implicit-function-declaration.
DeltaFile
+1-0contrib/tcsh-6/sh.decls.h
+1-01 files