-Werror=unused-variable (MinGW, extensions)

Change-Id: I88113be8ff3f4dfe641463267754ee8129bc767a
This commit is contained in:
Stephan Bergmann
2013-04-17 10:09:02 +02:00
parent e59f0a2df1
commit be9e5c5ade
2 changed files with 9 additions and 3 deletions

View File

@@ -91,6 +91,15 @@
#define NP_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#endif
#if defined WNT
static SECURITY_ATTRIBUTES NSP_pipe_access = {
sizeof (SECURITY_ATTRIBUTES), NULL, TRUE };
#define NSP_Inherited_Pipe(fd) \
(!CreatePipe(&fd[0], &fd[1], &NSP_pipe_access, 1024 * 10))
#else
#define NSP_Inherited_Pipe(fp) pipe(fd)
#endif
/***********************************************************************
*
* Implementations of plugin API functions

View File

@@ -43,7 +43,6 @@
//for pipe()
typedef int NSP_PIPE_FD;
#define NSP_Inherited_Pipe(fp) pipe(fd)
#define NSP_Close_Pipe(fp) close(fp)
//for write(), read()
#define NSP_Write_Pipe(a, b, c, d) write(a, b, c)
@@ -76,8 +75,6 @@ typedef int NSP_PIPE_FD;
//for pipe()
typedef HANDLE NSP_PIPE_FD;
static SECURITY_ATTRIBUTES NSP_pipe_access = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
#define NSP_Inherited_Pipe(fd) (!CreatePipe(&fd[0], &fd[1], &NSP_pipe_access, 1024*10))
#define NSP_Close_Pipe(fp) CloseHandle(fp)
//for write(), read()
#define NSP_Write_Pipe(a, b, c, d) WriteFile(a, b, c, d, NULL)