diff --git a/src/mingw/device.c b/src/mingw/device.c
index 10f7abce..5e449d50 100644
--- a/src/mingw/device.c
+++ b/src/mingw/device.c
@@ -89,7 +89,6 @@ static bool setup_device(void) {
 	bool found = false;
 
 	int err;
-	HANDLE thread;
 
 	get_config_string(lookup_config(config_tree, "Device"), &device);
 	get_config_string(lookup_config(config_tree, "Interface"), &iface);