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 58a4a85sys/kern kern_kinfo.c, usr.bin/systat ifstat.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/systat/ifstat.c
+1-1usr.bin/telnet/ring.c
+1-1usr.sbin/keyserv/crypt_server.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-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
+1-1usr.bin/m4/misc.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

DragonFlyBSD/src 14de021sys/net/dummynet ip_dummynet_glue.c

Fix kernel build without INVARIANTS.

8a93af2a9b3a6586d0d394bec8454562ee76044f removed all usage of 'ip' except
for the KKASSERT().
DeltaFile
+1-1sys/net/dummynet/ip_dummynet_glue.c
+1-11 files

DragonFlyBSD/src 8e543e5sys/conf options

Remove unused OHCI_DEBUG and I_WANT_DEPRECATED_STUFF kernel options.
DeltaFile
+0-4sys/conf/options
+0-41 files

DragonFlyBSD/src 590398asys/conf options, sys/config LINT64

kernel: Remove some broken/unused dpt(4) options and cleanup fallout.
DeltaFile
+0-69sys/dev/raid/dpt/dpt.h
+1-21sys/dev/raid/dpt/dpt_scsi.c
+0-12sys/config/LINT64
+0-3sys/conf/options
+1-1054 files

DragonFlyBSD/src 547e4f9lib/libc/stdio funopen.3, lib/libc/sys fork.2

Fix various issues in manual pages.

* BACKLIGHT_SET_STATUS() is not in the backlight interface on Dragonfly.
  So remove the associated documentation.

* Remove unneeded .Pp

* Fix whitespace issues.

* Add .Mt where it is missing.

* Fix .Dd

* Fix some .Fn -> .Dv

* Use .Fx, .Nx and .Ox

* .Nm needs an argument only the first time.
DeltaFile
+22-11sbin/gpt/gpt.8
+3-11share/man/man9/backlight.9
+5-5usr.bin/diff/diff.1
+2-2lib/libcuse/cuse.3
+1-2lib/libc/sys/fork.2
+1-2lib/libc/stdio/funopen.3
+34-3323 files not shown
+53-5829 files

DragonFlyBSD/src 7658847sys/dev/acpica Makefile

kernel/acpi: Add back pci_if.h to the Makefile.

I accidentally removed it in the last upgrade (ece4963efa8e37fb73925).
DeltaFile
+1-1sys/dev/acpica/Makefile
+1-11 files

DragonFlyBSD/src b210d9asys/platform/pc64/x86_64 efirt.c

efirt - Register EFI Reset with the shutdown_final EVENTHANDLER.

- This adds a safeguard to efi_enter() to fail gracefully when called from
  a kernel thread, where curthread->td_lwp is NULL.
- Further work is needed to allow EFI Reset to work more simply without
  messing with the current LWP's vmspace.
DeltaFile
+22-0sys/platform/pc64/x86_64/efirt.c
+22-01 files

DragonFlyBSD/src a70c304sys/ddb db_command.c

ddb - Try AcpiReset() when invoking DDB's reset command.

- This allows some modern notebooks to successfully reset from DDB, where
  the classic outb(0x64, 0xFE) method no longer works. For some notebooks,
  we'll also need to support EFI Reset here, but that will require further
  work.
DeltaFile
+20-0sys/ddb/db_command.c
+20-01 files

DragonFlyBSD/src c1bd8b2nrelease Makefile

nrelease: Add supported "nopkgs" to the help text

It was mistakenly removed in commit
f2e741e444130a01827ab75e5e0fa0bba30d41c2.
DeltaFile
+1-0nrelease/Makefile
+1-01 files

DragonFlyBSD/src 4961ae1sys/bus/u4b usb_msctest.c usb_device.c

u4b: Sync usb_msctest.[ch] with FreeBSD

Most changes are auto quirk detection and application. However, the
previous commit disabled such auto quirks, so this commit should have no
functional change.
DeltaFile
+114-76sys/bus/u4b/usb_msctest.c
+7-3sys/bus/u4b/usb_device.c
+6-3sys/bus/u4b/usb_msctest.h
+2-0sys/bus/u4b/usb_debug.h
+129-824 files

DragonFlyBSD/src 1e808f1sys/bus/u4b usb_device.c usb_dragonfly.h

u4b: Make autoquirk code optional and opt out

As the FreeBSD described:
> There are significant problems with the current autoquirk code. This
> results in quite a bit of bogus over-quirking.
> ...
> For all these reasons, I'm turning this off and will likely remove it
> entirely in the future once the alternative SYNC CACHE code has
> provent itself.

Actually, this fixes the USB stick probing timeout error in a USB 3.0
port on my HPE MicroServer Gen10.  That timeout error happened during
the boot and would drop the system to the 'mountroot>' prompt:

```
CAM: Configuring bus: ahci0
CAM: Configuring bus: ahci0
CAM: Configuring bus: ahci0
CAM: Configuring bus: ahci0

    [56 lines not shown]
DeltaFile
+1-1sys/bus/u4b/usb_device.c
+1-0sys/bus/u4b/usb_dragonfly.h
+2-12 files

DragonFlyBSD/src ce4e1c0lib/libc/sys socket.2

socket.2: Fix alignment of socket flags
DeltaFile
+2-2lib/libc/sys/socket.2
+2-21 files

DragonFlyBSD/src a372369share/mk bsd.sys.mk

bsd.sys.mk: Fix comment.
DeltaFile
+1-1share/mk/bsd.sys.mk
+1-11 files

DragonFlyBSD/src f278f02doc porting_drivers.txt, sys/bus/cam cam_sim.c

kernel: Use lockowned() instead of (lockstatus(&lock, curthread) != 0).

It is sufficient and more lightweight.

Most of these lockstatus() were added by me.

Discussed-with: aly
DeltaFile
+9-9sys/dev/raid/mps/mps_sas.c
+6-6sys/dev/raid/tws/tws_services.c
+6-4doc/porting_drivers.txt
+4-5sys/dev/raid/mps/mps.c
+4-4sys/dev/raid/tws/tws_cam.c
+3-3sys/bus/cam/cam_sim.c
+32-3126 files not shown
+65-6832 files

DragonFlyBSD/src b200855doc porting_drivers.txt

porting_drivers.txt: Improve wording a bit.
DeltaFile
+10-8doc/porting_drivers.txt
+10-81 files

DragonFlyBSD/src f403c94sys/kern subr_gtaskqueue.c

kernel/gtaskqueue: Fix a macro. It's not used in current code.
DeltaFile
+1-1sys/kern/subr_gtaskqueue.c
+1-11 files