b15eff2632
Warning fix for 64-bit platforms Hello! The patch fixes following warning seen on 64-bit platforms (in my case - x86_64, gcc-4.0): In file included from /usr/local/src/hostap/driver/modules/hostap_cs.c:203: /usr/local/src/hostap/driver/modules/hostap_hw.c: In function ?prism2_transmit_cb?: /usr/local/src/hostap/driver/modules/hostap_hw.c:1674: warning: cast from pointer to integer of different size /usr/local/src/hostap/driver/modules/hostap_hw.c: In function ?prism2_transmit?: /usr/local/src/hostap/driver/modules/hostap_hw.c:1758: warning: cast to pointer from integer of different size prism2_transmit_cb uses a (void *) argument to get an integer. A simple fix would be to use double cast from pointer to long and then to int (and vice versa when int is passed as a pointer). But I prefer a slightly longer patch. I believe that whenever an argument can hold both a pointer and an integer, it should be declared long. long can hold both pointers and integers (except win64, but we are not coding for Windows), it can be cast to both of them and it's never assumed to be a valid pointer, which could be useful for some automatic code checkers. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi> Signed-off-by: Jeff Garzik <jgarzik@pobox.com> |
||
---|---|---|
.. | ||
hostap_80211_rx.c | ||
hostap_80211_tx.c | ||
hostap_80211.h | ||
hostap_ap.c | ||
hostap_ap.h | ||
hostap_common.h | ||
hostap_config.h | ||
hostap_crypt_ccmp.c | ||
hostap_crypt_tkip.c | ||
hostap_crypt_wep.c | ||
hostap_crypt.c | ||
hostap_crypt.h | ||
hostap_cs.c | ||
hostap_download.c | ||
hostap_hw.c | ||
hostap_info.c | ||
hostap_ioctl.c | ||
hostap_pci.c | ||
hostap_plx.c | ||
hostap_proc.c | ||
hostap_wlan.h | ||
hostap.c | ||
hostap.h | ||
Kconfig | ||
Makefile |