diff --git a/src/eap_server/eap_server_wsc.c b/src/eap_server/eap_server_wsc.c
index d8371c9fd..0345cdc69 100644
--- a/src/eap_server/eap_server_wsc.c
+++ b/src/eap_server/eap_server_wsc.c
@@ -34,6 +34,7 @@ struct eap_wsc_data {
 };
 
 
+#ifndef CONFIG_NO_STDOUT_DEBUG
 static const char * eap_wsc_state_txt(int state)
 {
 	switch (state) {
@@ -53,6 +54,7 @@ static const char * eap_wsc_state_txt(int state)
 		return "?";
 	}
 }
+#endif /* CONFIG_NO_STDOUT_DEBUG */
 
 
 static void eap_wsc_state(struct eap_wsc_data *data, int state)
diff --git a/src/wps/wps_dev_attr.c b/src/wps/wps_dev_attr.c
index bf28f329d..090bfa2bf 100644
--- a/src/wps/wps_dev_attr.c
+++ b/src/wps/wps_dev_attr.c
@@ -284,7 +284,9 @@ static int wps_process_dev_name(struct wps_device_data *dev, const u8 *str,
 static int wps_process_primary_dev_type(struct wps_device_data *dev,
 					const u8 *dev_type)
 {
+#ifndef CONFIG_NO_STDOUT_DEBUG
 	char devtype[WPS_DEV_TYPE_BUFSIZE];
+#endif /* CONFIG_NO_STDOUT_DEBUG */
 
 	if (dev_type == NULL) {
 		wpa_printf(MSG_DEBUG, "WPS: No Primary Device Type received");
diff --git a/src/wps/wps_upnp_ssdp.c b/src/wps/wps_upnp_ssdp.c
index 9d6c33088..8505d0585 100644
--- a/src/wps/wps_upnp_ssdp.c
+++ b/src/wps/wps_upnp_ssdp.c
@@ -524,7 +524,9 @@ fail:
 static void ssdp_parse_msearch(struct upnp_wps_device_sm *sm,
 			       struct sockaddr_in *client, const char *data)
 {
+#ifndef CONFIG_NO_STDOUT_DEBUG
 	const char *start = data;
+#endif /* CONFIG_NO_STDOUT_DEBUG */
 	const char *end;
 	int got_host = 0;
 	int got_st = 0, st_match = 0;