2

Github Enable -Wcast-function-type globally · Issue #20 · KSPP/linux · GitHub

 3 years ago
source link: https://github.com/KSPP/linux/issues/20
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Author

kees commented on Nov 15, 2019

edited

Excluding the fixes being developed for crypto, bnx2x, and staging/rtl*, the remaining 23 cases found with an x86_64 allmodconfig build are:

./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘unsigned int (*)(const void *, const struct bpf_insn *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
kernel/bpf/verifier.c:8928:16: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘void * (* const)(struct bpf_map *, void *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
kernel/bpf/verifier.c:9281:17: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘int (* const)(struct bpf_map *, void *, void *, u64)’ {aka ‘int (* const)(struct bpf_map *, void *, void *, long long unsigned int)’} to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
kernel/bpf/verifier.c:9285:17: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘int (* const)(struct bpf_map *, void *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
kernel/bpf/verifier.c:9289:17: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘int (* const)(struct bpf_map *, void *, u64)’ {aka ‘int (* const)(struct bpf_map *, void *, long long unsigned int)’} to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
kernel/bpf/verifier.c:9293:17: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘int (* const)(struct bpf_map *, void *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
kernel/bpf/verifier.c:9297:17: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘int (* const)(struct bpf_map *, void *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
kernel/bpf/verifier.c:9301:17: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘void * (*)(struct bpf_map *, void *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
./include/linux/filter.h:352:14: note: in definition of macro ‘BPF_EMIT_CALL’
kernel/bpf/hashtab.c:510:26: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘void * (*)(struct bpf_map *, void *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
./include/linux/filter.h:352:14: note: in definition of macro ‘BPF_EMIT_CALL’
kernel/bpf/hashtab.c:551:26: note: in expansion of macro ‘BPF_CAST_CALL’
./include/linux/filter.h:344:4: warning: cast between incompatible function types from ‘void * (*)(struct bpf_map *, void *)’ to ‘u64 (*)(u64,  u64,  u64,  u64,  u64)’ {aka ‘long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)’} [-Wcast-function-type]
./include/linux/filter.h:352:14: note: in definition of macro ‘BPF_EMIT_CALL’
kernel/bpf/hashtab.c:1488:26: note: in expansion of macro ‘BPF_CAST_CALL’
drivers/firewire/core-cdev.c:985:8: warning: cast between incompatible function types from ‘void (*)(struct fw_iso_context *, dma_addr_t,  void *)’ {aka ‘void (*)(struct fw_iso_context *, long long unsigned int,  void *)’} to ‘void (*)(struct fw_iso_context *, u32,  size_t,  void *, void *)’ {aka ‘void (*)(struct fw_iso_context *, unsigned int,  long unsigned int,  void *, void *)’} [-Wcast-function-type]
kernel/trace/fgraph.c:337:4: warning: cast between incompatible function types from ‘void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct pt_regs *)’ to ‘void (*)(struct ftrace_graph_ret *)’ [-Wcast-function-type]
kernel/trace/fgraph.c:617:24: warning: cast between incompatible function types from ‘void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct pt_regs *)’ to ‘void (*)(struct ftrace_graph_ret *)’ [-Wcast-function-type]
drivers/net/usb/hso.c:1268:9: warning: cast between incompatible function types from ‘void (*)(struct hso_serial *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/wireless/broadcom/b43legacy/main.c:3744:8: warning: cast between incompatible function types from ‘void (*)(struct b43legacy_wldev *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/wireless/intel/ipw2x00/ipw2100.c:6140:35: warning: cast between incompatible function types from ‘void (*)(struct ipw2100_priv *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/wireless/intel/ipw2x00/ipw2200.c:10683:35: warning: cast between incompatible function types from ‘void (*)(struct ipw_priv *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/wireless/intel/iwlegacy/4965-mac.c:6240:8: warning: cast between incompatible function types from ‘void (*)(struct il_priv *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/usb/usbnet.c:1703:17: warning: cast between incompatible function types from ‘void (*)(struct timer_list *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/wireless/intel/iwlegacy/3945-mac.c:3404:8: warning: cast between incompatible function types from ‘void (*)(struct il_priv *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:293:6: note: while referencing ‘eth_addr’
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:288:6: note: while referencing ‘eth_addr_mask’
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:288:6: note: while referencing ‘eth_addr_mask’
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:288:6: note: while referencing ‘eth_addr_mask’
drivers/net/wireless/realtek/rtlwifi/pci.c:1196:8: warning: cast between incompatible function types from ‘void (*)(struct ieee80211_hw *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/net/wireless/realtek/rtlwifi/pci.c:1199:8: warning: cast between incompatible function types from ‘void (*)(struct ieee80211_hw *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
drivers/scsi/aacraid/aachba.c:813:23: warning: cast between incompatible function types from ‘int (*)(struct scsi_cmnd *)’ to ‘void (*)(struct scsi_cmnd *)’ [-Wcast-function-type]

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK