Silence printf() calls in wpa_gui to avoid stdout output from a GUI program

This commit is contained in:
Jouni Malinen 2008-11-21 14:05:37 +02:00 committed by Jouni Malinen
parent 8038591be2
commit 3b14fb0cab
2 changed files with 10 additions and 1 deletions

View File

@ -27,7 +27,7 @@ int main(int argc, char *argv[])
#ifdef CONFIG_NATIVE_WINDOWS #ifdef CONFIG_NATIVE_WINDOWS
WSADATA wsaData; WSADATA wsaData;
if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { if (WSAStartup(MAKEWORD(2, 0), &wsaData)) {
printf("Could not find a usable WinSock.dll\n"); /* printf("Could not find a usable WinSock.dll\n"); */
return -1; return -1;
} }
#endif /* CONFIG_NATIVE_WINDOWS */ #endif /* CONFIG_NATIVE_WINDOWS */

View File

@ -28,6 +28,15 @@
#include "userdatarequest.h" #include "userdatarequest.h"
#include "networkconfig.h" #include "networkconfig.h"
#if 1
/* Silence stdout */
#define printf wpagui_printf
static int wpagui_printf(const char *, ...)
{
return 0;
}
#endif
WpaGui::WpaGui(QWidget *parent, const char *, Qt::WFlags) WpaGui::WpaGui(QWidget *parent, const char *, Qt::WFlags)
: QMainWindow(parent) : QMainWindow(parent)
{ {