mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
Enables warning in the compiler and fixes some issues, reference => https://github.com/diederikdehaas/rtl8812AU
This commit is contained in:
committed by
popcornmix
parent
d66668c83f
commit
06b866ddad
@@ -1,12 +1,20 @@
|
||||
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
|
||||
EXTRA_CFLAGS += -O1
|
||||
#EXTRA_CFLAGS += -O3
|
||||
#EXTRA_CFLAGS += -Wall
|
||||
#EXTRA_CFLAGS += -Wextra
|
||||
EXTRA_CFLAGS += -Wall
|
||||
EXTRA_CFLAGS += -Wextra
|
||||
#EXTRA_CFLAGS += -Werror
|
||||
#EXTRA_CFLAGS += -pedantic
|
||||
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
|
||||
|
||||
# The "$(call cc-option,-Wxxx)" macro only includes that option when it's
|
||||
# supported by the compiler used. It may only work on Debian systems.
|
||||
|
||||
# Wdate-time was added in gcc-4.9
|
||||
EXTRA_CFLAGS += $(call cc-option,-Werror=date-time)
|
||||
# Wincompatible-pointer-types was added in gcc-5.0
|
||||
EXTRA_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
|
||||
|
||||
EXTRA_CFLAGS += -Wno-unused-variable
|
||||
EXTRA_CFLAGS += -Wno-unused-value
|
||||
EXTRA_CFLAGS += -Wno-unused-label
|
||||
@@ -14,10 +22,16 @@ EXTRA_CFLAGS += -Wno-unused-parameter
|
||||
EXTRA_CFLAGS += -Wno-unused-function
|
||||
EXTRA_CFLAGS += -Wno-unused
|
||||
|
||||
EXTRA_CFLAGS += -Wno-uninitialized
|
||||
# Relax some warnings from '-Wextra' so we won't get flooded with warnings
|
||||
EXTRA_CFLAGS += -Wno-sign-compare
|
||||
EXTRA_CFLAGS += -Wno-missing-field-initializers
|
||||
|
||||
#EXTRA_CFLAGS += -Wno-uninitialized
|
||||
|
||||
EXTRA_CFLAGS += -I$(src)/include
|
||||
|
||||
EXTRA_LDFLAGS += --strip-debug
|
||||
|
||||
CONFIG_AUTOCFG_CP = n
|
||||
|
||||
CONFIG_RTL8192C = y
|
||||
|
||||
@@ -210,7 +210,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
u8 bmatch = _FALSE;
|
||||
u8 *pie = pnetwork->IEs;
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u8 *p=NULL, *dst_ie=NULL, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
|
||||
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;)
|
||||
@@ -250,6 +250,9 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
|
||||
dst_ie = (p+ielen);
|
||||
}
|
||||
|
||||
if(dst_ie == NULL)
|
||||
return;
|
||||
|
||||
if(remainder_ielen>0)
|
||||
{
|
||||
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
||||
@@ -357,7 +360,7 @@ void expire_timeout_chk(_adapter *padapter)
|
||||
{
|
||||
_irqL irqL;
|
||||
_list *phead, *plist;
|
||||
u8 updated;
|
||||
u8 updated = _FALSE;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
u8 chk_alive_num = 0;
|
||||
|
||||
@@ -1859,7 +1859,8 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *act
|
||||
{
|
||||
const u8 *frame_body = frame + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
u16 fc;
|
||||
u8 c, a;
|
||||
u8 c;
|
||||
u8 a = ACT_PUBLIC_MAX;
|
||||
|
||||
fc = le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)frame)->frame_ctl);
|
||||
|
||||
|
||||
@@ -2454,7 +2454,7 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame)
|
||||
psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
|
||||
if(psta)
|
||||
{
|
||||
u8 updated;
|
||||
u8 updated = _FALSE;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if(rtw_is_list_empty(&psta->asoc_list)==_FALSE)
|
||||
@@ -2548,7 +2548,7 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame)
|
||||
psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
|
||||
if(psta)
|
||||
{
|
||||
u8 updated;
|
||||
u8 updated = _FALSE;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if(rtw_is_list_empty(&psta->asoc_list)==_FALSE)
|
||||
@@ -5663,7 +5663,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||
|
||||
// Commented by Kurt 20120113
|
||||
// Get peer_dev_addr here if peer doesn't issue prov_disc frame.
|
||||
if( _rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN) );
|
||||
if( _rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN) )
|
||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
|
||||
|
||||
result = process_p2p_group_negotation_req( pwdinfo, frame_body, len );
|
||||
@@ -11932,7 +11932,7 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf)
|
||||
u8 set_stakey_hdl(_adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
u16 ctrl=0;
|
||||
u8 cam_id;//cam_entry
|
||||
u8 cam_id=0;//cam_entry
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
struct set_stakey_parm *pparm = (struct set_stakey_parm *)pbuf;
|
||||
|
||||
@@ -4896,9 +4896,9 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role)
|
||||
#endif
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct wifidirect_info *pbuddy_wdinfo;
|
||||
struct mlme_priv *pbuddy_mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext;
|
||||
struct wifidirect_info *pbuddy_wdinfo = NULL;
|
||||
struct mlme_priv *pbuddy_mlmepriv = NULL;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = NULL;
|
||||
#endif
|
||||
|
||||
pwdinfo = &padapter->wdinfo;
|
||||
|
||||
@@ -853,7 +853,7 @@ void flush_all_cam_entry(_adapter *padapter)
|
||||
{
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta;
|
||||
u8 cam_id;//cam_entry
|
||||
u8 cam_id=0;//cam_entry
|
||||
|
||||
psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress);
|
||||
if(psta) {
|
||||
|
||||
@@ -2590,7 +2590,7 @@ exit:
|
||||
s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
_irqL irqL;
|
||||
_queue *queue;
|
||||
_queue *queue = NULL;
|
||||
_adapter *padapter = pxmitpriv->adapter;
|
||||
_pkt *pndis_pkt = NULL;
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ static void getTxPowerWriteValByRegulatory(
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
u8 i, chnlGroup, pwr_diff_limit[4];
|
||||
u8 i, chnlGroup = 0, pwr_diff_limit[4];
|
||||
u32 writeVal, customer_limit, rf;
|
||||
|
||||
//
|
||||
@@ -615,7 +615,7 @@ phy_RF6052_Config_ParaFile(
|
||||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
u32 u4RegValue;
|
||||
u32 u4RegValue=0;
|
||||
u8 eRFPath;
|
||||
BB_REGISTER_DEFINITION_T *pPhyReg;
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ exit:
|
||||
|
||||
void rtw_spt_band_free(struct ieee80211_supported_band *spt_band)
|
||||
{
|
||||
u32 size;
|
||||
u32 size = 0;
|
||||
|
||||
if(!spt_band)
|
||||
return;
|
||||
@@ -3822,7 +3822,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||
int ret=0;
|
||||
_irqL irqL;
|
||||
_list *phead, *plist;
|
||||
u8 updated;
|
||||
u8 updated = _FALSE;
|
||||
struct sta_info *psta = NULL;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
@@ -6584,7 +6584,6 @@ static int rtw_dbg_port(struct net_device *dev,
|
||||
case 0x01: //dbg mode
|
||||
padapter->recvpriv.is_signal_dbg = 1;
|
||||
extra_arg = extra_arg>100?100:extra_arg;
|
||||
extra_arg = extra_arg<0?0:extra_arg;
|
||||
padapter->recvpriv.signal_strength_dbg=extra_arg;
|
||||
break;
|
||||
}
|
||||
@@ -6956,7 +6955,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
||||
{
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
// 0: disable, 0x1:enable (but wifi_spec should be 0), 0x2: force enable (don't care wifi_spec)
|
||||
if( pregpriv && extra_arg >= 0 && extra_arg < 3 )
|
||||
if( pregpriv && extra_arg < 3 )
|
||||
{
|
||||
pregpriv->ampdu_enable= extra_arg;
|
||||
DBG_871X("set ampdu_enable=%d\n",pregpriv->ampdu_enable);
|
||||
|
||||
@@ -136,7 +136,7 @@ int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup)
|
||||
{
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
enum nl80211_key_type key_type;
|
||||
enum nl80211_key_type key_type = 0;
|
||||
#endif
|
||||
union iwreq_data wrqu;
|
||||
struct iw_michaelmicfailure ev;
|
||||
|
||||
@@ -995,7 +995,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
|
||||
int rtw_resume_process(_adapter *padapter)
|
||||
{
|
||||
struct net_device *pnetdev;
|
||||
struct pwrctrl_priv *pwrpriv;
|
||||
struct pwrctrl_priv *pwrpriv=NULL;
|
||||
int ret = -1;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
_func_enter_;
|
||||
@@ -1058,6 +1058,7 @@ exit:
|
||||
rtw_unlock_suspend();
|
||||
#endif //CONFIG_RESUME_IN_WORKQUEUE
|
||||
|
||||
if (pwrpriv)
|
||||
pwrpriv->bInSuspend = _FALSE;
|
||||
DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__
|
||||
, ret, rtw_get_passing_time_ms(start_time));
|
||||
|
||||
Reference in New Issue
Block a user