[Libreoffice-commits] core.git: Branch 'aoo/trunk' - cppuhelper/source
Pavel JanÃk
paveljanik at apache.org
Sun Oct 6 13:07:31 PDT 2013
cppuhelper/source/findsofficepath.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
New commits:
commit 433257ff294f37624c49ddecd2f7d00a22b56fc3
Author: Pavel JanÃk <paveljanik at apache.org>
Date: Sun Oct 6 18:13:06 2013 +0000
Declare variables when needed to prevent compiler warnings.
diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c
index a82b5e8..1600a35 100644
--- a/cppuhelper/source/findsofficepath.c
+++ b/cppuhelper/source/findsofficepath.c
@@ -129,21 +129,7 @@ static char* platformSpecific()
*/
static char* platformSpecific()
{
- const int SEPARATOR = '/';
- const char* PATHSEPARATOR = ":";
- const char* PATHVARNAME = "PATH";
- const char* APPENDIX = "/soffice";
-
char* path = NULL;
- char* env = NULL;
- char* str = NULL;
- char* dir = NULL;
- char* file = NULL;
- char* resolved = NULL;
- char* sep = NULL;
-
- char buffer[PATH_MAX];
- int pos;
#ifdef MACOSX
/* On MacOS we have no soffice link under /usr/bin but the default office location is known
@@ -159,6 +145,21 @@ static char* platformSpecific()
}
return path;
#else
+ const int SEPARATOR = '/';
+ const char* PATHSEPARATOR = ":";
+ const char* PATHVARNAME = "PATH";
+ const char* APPENDIX = "/soffice";
+
+ char* env = NULL;
+ char* str = NULL;
+ char* dir = NULL;
+ char* file = NULL;
+ char* resolved = NULL;
+ char* sep = NULL;
+
+ char buffer[PATH_MAX];
+ int pos;
+
/* get the value of the PATH environment variable */
env = getenv( PATHVARNAME );
str = (char*) malloc( strlen( env ) + 1 );
More information about the Libreoffice-commits
mailing list