An error occurred while fetching folder content.
ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings
Andrey Ryabinin authored
commit f0996bc2

 upstream.

Building lib/ubsan.c with gcc-9 results in a ton of nasty warnings like
this one:

    lib/ubsan.c warning: conflicting types for built-in function
         ‘__ubsan_handle_negate_overflow’; expected ‘void(void *, void *)’ [-Wbuiltin-declaration-mismatch]

The kernel's declarations of __ubsan_handle_*() often uses 'unsigned
long' types in parameters while GCC these parameters as 'void *' types,
hence the mismatch.

Fix this by using 'void *' to match GCC's declarations.
Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Fixes: c6d30853

 ("UBSAN: run-time undefined behavior sanity checker")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
b34d6553
Name Last commit Last update
..
842 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
fonts fonts: Add 6x10 font
lz4 lz4: fix bogus gcc warning
lzo lzo: check for length overrun in variable length encoding.
mpi lib/mpi: Fix umul_ppmm() for MIPS64r6
raid6 ARM: 8833/1: Ensure that NEON code always compiles with Clang
reed_solomon lib: Remove unnecessary inclusions of asm/semaphore.h
xz lib/xz: enable all filters by default in Kconfig
zlib_deflate zlib_deflate/deftree: remove bi_reverse()
zlib_inflate zlib: clean up some dead code
.gitignore X.509: Implement simple static OID registry
Kconfig Merge branch 'akpm' (patches from Andrew)
Kconfig.debug kasan: rework Kconfig settings
Kconfig.kasan mm, kasan: switch SLUB to stackdepot, enable memory quarantine for SLUB
Kconfig.kgdb kgdb: depends on VT
Kconfig.kmemcheck kmemcheck: depend on HAVE_ARCH_KMEMCHECK
Kconfig.ubsan ubsan: allow to disable the null sanitizer
Makefile kasan: prevent compiler from optimizing away memset in tests
argv_split.c argv_split(): teach it to handle mutable strings
asn1_decoder.c ASN.1: check for error from ASN1_OP_END__ACT actions
assoc_array.c assoc_array: Fix shortcut creation
atomic64.c locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
atomic64_test.c atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
audit.c syscalls: implement execveat() system call
bcd.c usb/core: use bin2bcd() for bcdDevice in RH
bch.c
bitmap.c
bitrev.c
bsearch.c
btree.c
bug.c
build_OID_registry
bust_spinlocks.c
chacha20.c
check_signature.c
checksum.c
clz_ctz.c
clz_tab.c
cmdline.c
compat_audit.c
cordic.c
cpu-notifier-error-inject.c
cpu_rmap.c
cpumask.c
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc16.c
crc32.c
crc32defs.h
crc7.c
crc8.c
ctype.c
debug_info.c
debug_locks.c
debugobjects.c
dec_and_lock.c
decompress.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlz4.c
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c
devres.c
digsig.c
div64.c
dma-debug.c
dma-noop.c
dump_stack.c
dynamic_debug.c
dynamic_queue_limits.c
earlycpio.c
extable.c
fault-inject.c
fdt.c
fdt_empty_tree.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
find_bit.c
flex_array.c
flex_proportions.c
gcd.c
gen_crc32table.c
genalloc.c
glob.c
halfmd4.c
hexdump.c
hweight.c
idr.c
inflate.c
int_sqrt.c
interval_tree.c
interval_tree_test.c
iomap.c
iomap_copy.c
iommu-common.c