Fix build with gcc-10 (-Wrestrict)

Fixes errors such as this:

```
os_dep/linux/ioctl_mp.c:611:4: warning: 'sprintf' argument 3 overlaps destination object 'extra' [-Wrestrict]
error, forbidden warning:ioctl_mp.c:611
  611 |    sprintf(extra, "%s,pathb=%d", extra, txpower_inx);
```

Fixes #221
This commit is contained in:
Gleb Mazovetskiy
2021-02-06 10:06:22 +00:00
committed by Carlos Garces
parent 722ebf1e6d
commit d6e1690ae8
2 changed files with 15 additions and 10 deletions

View File

@@ -2418,6 +2418,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
u32 psd_data = 0;
struct psd_init_regs regs = {};
int psd_analysis = 0;
u8 *pdata = data;
#ifdef PLATFORM_LINUX
if (!netif_running(pAdapter->pnetdev)) {
@@ -2449,7 +2450,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
psd_data = rtw_GetPSDData(pAdapter, i - psd_pts);
else
psd_data = rtw_GetPSDData(pAdapter, i);
sprintf(data, "%s%x ", data, psd_data);
pdata += sprintf(pdata, "%x ", psd_data);
i++;
}