You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pa...@apache.org on 2013/10/06 20:13:06 UTC
svn commit: r1529655 -
/openoffice/trunk/main/cppuhelper/source/findsofficepath.c
Author: paveljanik
Date: Sun Oct 6 18:13:06 2013
New Revision: 1529655
URL: http://svn.apache.org/r1529655
Log:
Declare variables when needed to prevent compiler warnings.
Modified:
openoffice/trunk/main/cppuhelper/source/findsofficepath.c
Modified: openoffice/trunk/main/cppuhelper/source/findsofficepath.c
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cppuhelper/source/findsofficepath.c?rev=1529655&r1=1529654&r2=1529655&view=diff
==============================================================================
--- openoffice/trunk/main/cppuhelper/source/findsofficepath.c (original)
+++ openoffice/trunk/main/cppuhelper/source/findsofficepath.c Sun Oct 6 18:13:06 2013
@@ -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 );