summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-02-20 08:33:23 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2019-02-20 08:33:23 -0800
commit388a537f2d2c7dad07598a155aad086d0dee80e0 (patch)
treea8c103b30673668ea6563e6546549718b9b1e4ac
parentc2b26cb179036c71314ffe091a1836beb3a53897 (diff)
downloadpsutil-388a537f2d2c7dad07598a155aad086d0dee80e0.tar.gz
fix compiler warning
-rw-r--r--psutil/_psutil_windows.c1
-rw-r--r--psutil/arch/windows/global.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c
index 9bb631ee..d1fec400 100644
--- a/psutil/_psutil_windows.c
+++ b/psutil/_psutil_windows.c
@@ -2593,7 +2593,6 @@ psutil_users(PyObject *self, PyObject *args) {
PWTS_CLIENT_ADDRESS address;
char address_str[50];
long long unix_time;
- PWINSTATIONQUERYINFORMATIONW WinStationQueryInformationW;
WINSTATION_INFO station_info;
ULONG returnLen;
PyObject *py_tuple = NULL;
diff --git a/psutil/arch/windows/global.c b/psutil/arch/windows/global.c
index 28a9e008..ac633442 100644
--- a/psutil/arch/windows/global.c
+++ b/psutil/arch/windows/global.c
@@ -4,7 +4,6 @@
* found in the LICENSE file.
*/
-#include <stdio.h>
#include <windows.h>
#include <Python.h>
#include "ntextapi.h"
@@ -49,7 +48,10 @@ psutil_GetProcAddressFromLib(LPCSTR libname, LPCSTR procname) {
}
-int
+/*
+ * This is executed on import and loads Windows APIs so that they
+ * are available globally.
+ */
psutil_loadlibs() {
/*
* Mandatory.