diff --git a/netwerk/wifi/src/nsWifiScannerWin.cpp b/netwerk/wifi/src/nsWifiScannerWin.cpp index c4fbcd17cb2..f333f4db4ab 100644 --- a/netwerk/wifi/src/nsWifiScannerWin.cpp +++ b/netwerk/wifi/src/nsWifiScannerWin.cpp @@ -201,7 +201,7 @@ int PerformQuery(HANDLE adapter_handle, return ERROR_SUCCESS; } -HANDLE GetFileHandle(const unsigned short* device_name) { +HANDLE GetFileHandle(const PRUnichar* device_name) { // We access a device with DOS path \Device\ at // \\.\. @@ -219,7 +219,7 @@ HANDLE GetFileHandle(const unsigned short* device_name) { } -bool UndefineDosDevice(const unsigned short* device_name) { +bool UndefineDosDevice(const PRUnichar* device_name) { // We remove only the mapping we use, that is \Device\. nsString target_path; target_path.Assign(L"\\Device\\"); @@ -230,14 +230,14 @@ bool UndefineDosDevice(const unsigned short* device_name) { target_path.get()) == TRUE; } -bool DefineDosDeviceIfNotExists(unsigned short* device_name, bool* dosDeviceDefined) { +bool DefineDosDeviceIfNotExists(const PRUnichar* device_name, bool* dosDeviceDefined) { // We create a DOS device name for the device at \Device\. nsString target_path; target_path.Assign(L"\\Device\\"); target_path.Append(device_name); - unsigned short target[kStringLength]; + WCHAR target[kStringLength]; if (QueryDosDeviceW(device_name, target, kStringLength) > 0 && target_path.Equals(target)) { // Device already exists. @@ -273,7 +273,7 @@ void GetNetworkInterfaces(nsStringArray& interfaces) } for (int i = 0; ; ++i) { - unsigned short name[kStringLength]; + WCHAR name[kStringLength]; DWORD name_size = kStringLength; FILETIME time; @@ -299,7 +299,7 @@ void GetNetworkInterfaces(nsStringArray& interfaces) break; } - unsigned short service_name[kStringLength]; + PRUnichar service_name[kStringLength]; DWORD service_name_size = kStringLength; DWORD type = 0; @@ -362,7 +362,7 @@ nsWifiMonitor::DoScan() for (int i = 0; i < interfaces.Count(); i++) { nsString *s = interfaces.StringAt(i); - unsigned short *service_name = (PRUnichar*) s->get(); + const PRUnichar *service_name = s->get(); #ifndef WINCE bool dosDeviceDefined = false; @@ -429,7 +429,6 @@ nsWifiMonitor::DoScan() #endif // Walk through the BSS IDs. - int found = 0; const uint8 *iterator = (const uint8*)&bssid_list->Bssid[0]; const uint8 *end_of_buffer = (const uint8*)buffer + oid_buffer_size_; for (int i = 0; i < static_cast(bssid_list->NumberOfItems); ++i) { diff --git a/netwerk/wifi/src/wlanapi.h b/netwerk/wifi/src/wlanapi.h index 67c2b084f36..3d32474a8e6 100644 --- a/netwerk/wifi/src/wlanapi.h +++ b/netwerk/wifi/src/wlanapi.h @@ -39,7 +39,7 @@ typedef DWORD (WINAPI *WlanOpenHandleFunction)(DWORD dwClientVersion, // WlanEnumInterfaces typedef enum _WLAN_INTERFACE_STATE { - WLAN_INTERFACE_STATE_UNUSED, + WLAN_INTERFACE_STATE_UNUSED } WLAN_INTERFACE_STATE; typedef struct _WLAN_INTERFACE_INFO { @@ -71,11 +71,11 @@ typedef struct _DOT11_SSID { typedef UCHAR DOT11_MAC_ADDRESS[6]; typedef enum _DOT11_BSS_TYPE { - DOT11_BSS_TYPE_UNUSED, + DOT11_BSS_TYPE_UNUSED } DOT11_BSS_TYPE; typedef enum _DOT11_PHY_TYPE { - DOT11_PHY_TYPE_UNUSED, + DOT11_PHY_TYPE_UNUSED } DOT11_PHY_TYPE; #define DOT11_RATE_SET_MAX_LENGTH (126)