[Libreoffice-commits] .: 3 commits - extensions/source
David Tardon
dtardon at kemper.freedesktop.org
Sun May 6 10:52:19 PDT 2012
extensions/source/nsplugin/source/npshell.cxx | 6 +++++-
extensions/source/nsplugin/source/nsp_windows.cxx | 4 ++++
extensions/source/nsplugin/source/so_env.cxx | 4 ++++
extensions/source/nsplugin/source/so_main.cxx | 10 ++++++----
4 files changed, 19 insertions(+), 5 deletions(-)
New commits:
commit 30115a0e78cba478562f183fe06da025b3f44936
Author: David Tardon <dtardon at redhat.com>
Date: Sun May 6 13:52:07 2012 +0200
WaE: NULL used in arithmetic
Change-Id: I89352cd2ae1d5517dff38294ff2bb53d39aadb8d
diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index c4065b6..e9aae65 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -746,7 +746,7 @@ NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
if(0 != strcmp(fname, localPathNew)) {
#ifdef WNT
- if(NULL == CopyFile(fname, localPathNew, FALSE))
+ if(FALSE == CopyFile(fname, localPathNew, FALSE))
return;
#endif //end of WNT
commit 7169b1b308131e4c9c75efd49544989e1d82a573
Author: David Tardon <dtardon at redhat.com>
Date: Sun May 6 06:47:53 2012 +0200
WaE: ordered comparison of pointer with integer zero
Change-Id: I832ecd73e5456d90c3247851ed4803f2edb51ae5
diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx
index 941bf8f..4a624fa 100644
--- a/extensions/source/nsplugin/source/so_main.cxx
+++ b/extensions/source/nsplugin/source/so_main.cxx
@@ -456,12 +456,12 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fd_pipe[1] = (NSP_PIPE_FD) iPipe[1] ;
NSP_Close_Pipe(fd_pipe[1]);
- la_read_fd = fd_pipe[0];
- if(la_read_fd < 0)
+ if(iPipe[0] < 0)
{
- debug_fprintf(NSP_LOG_APPEND, "print by nsplugin, command error: bad read file id:%s \n", la_read_fd);
+ debug_fprintf(NSP_LOG_APPEND, "print by nsplugin, command error: bad read file id:%s \n", iPipe[0]);
return 0;
}
+ la_read_fd = fd_pipe[0];
// the program path is provided only on unix, on windows the registry entry is used
if ( argc > 4 )
commit 919697f91298ced168c1d6baac7e0d6db3100db6
Author: David Tardon <dtardon at redhat.com>
Date: Sun May 6 06:40:45 2012 +0200
WaE: unknown pragma
Change-Id: Id1c36d09bb2d701474e5161e12be4bf599d8efd5
diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index 33c282f..c4065b6 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -47,8 +47,10 @@
#define _WINDOWS
+#ifdef _MSC_VER
#pragma warning (push,1)
#pragma warning (disable:4668)
+#endif
#include <windows.h>
#include <direct.h>
@@ -57,7 +59,9 @@
#include <sys/types.h>
#include <fcntl.h>
+#ifdef _MSC_VER
#pragma warning (pop)
+#endif
#endif //end of WNT
diff --git a/extensions/source/nsplugin/source/nsp_windows.cxx b/extensions/source/nsplugin/source/nsp_windows.cxx
index f6e7d2f..e143a69 100644
--- a/extensions/source/nsplugin/source/nsp_windows.cxx
+++ b/extensions/source/nsplugin/source/nsp_windows.cxx
@@ -28,11 +28,15 @@
#ifdef WNT
+#ifdef _MSC_VER
#pragma warning (push,1)
#pragma warning (disable:4668)
+#endif
#include <windows.h>
+#ifdef _MSC_VER
#pragma warning (pop)
#endif
+#endif
int NSP_ResetWinStyl(long hParent)
{
diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx
index 92faaa2..b196a33 100644
--- a/extensions/source/nsplugin/source/so_env.cxx
+++ b/extensions/source/nsplugin/source/so_env.cxx
@@ -42,9 +42,11 @@
#ifdef WNT
#define _WINDOWS
+#ifdef _MSC_VER
#pragma warning (push,1)
#pragma warning (disable:4668)
#pragma warning (disable:4917)
+#endif
#include <windows.h>
#include <direct.h>
@@ -54,7 +56,9 @@
// For vsnprintf()
#define NSP_vsnprintf _vsnprintf
+#ifdef _MSC_VER
#pragma warning (pop)
+#endif
#endif // End WNT
#include <sys/stat.h>
diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx
index 6bf83d9..941bf8f 100644
--- a/extensions/source/nsplugin/source/so_main.cxx
+++ b/extensions/source/nsplugin/source/so_main.cxx
@@ -37,16 +37,18 @@
#ifdef WNT
#ifdef _MSC_VER
#pragma once
-#endif
#pragma warning (push,1)
#pragma warning (disable:4668)
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
+#ifdef _MSC_VER
#pragma warning (pop)
+#endif
#endif //end of WNT
#include <unistd.h>
More information about the Libreoffice-commits
mailing list