This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
more host-side compiler warning cleanups
- From: Bart Veer <bartv at ecoscentric dot com>
- To: ecos-patches at sourceware dot org
- Date: Fri, 15 Aug 2008 17:49:53 +0100
- Subject: more host-side compiler warning cleanups
>From host/configtool/standalone/common
2008-08-15 Bart Veer <bartv@ecoscentric.com>
* ecosconfig.cxx, cdl_exec.cxx: avoid compiler warnings.
and from host/configtool/common/common:
2008-08-15 Bart Veer <bartv@ecoscentric.com>
* common/common/build.cxx: avoid compiler warning.
Index: configtool/standalone/common/cdl_exec.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/common/cdl_exec.cxx,v
retrieving revision 1.16
diff -u -p -r1.16 cdl_exec.cxx
--- configtool/standalone/common/cdl_exec.cxx 13 Aug 2008 09:37:07 -0000 1.16
+++ configtool/standalone/common/cdl_exec.cxx 15 Aug 2008 16:48:43 -0000
@@ -44,6 +44,7 @@
#ifdef _MSC_VER
#include <direct.h> /* for getcwd() */
#else
+#include <limits.h>
#include <unistd.h> /* for getcwd() */
#endif
#ifdef __CYGWIN__
Index: configtool/standalone/common/ecosconfig.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/common/ecosconfig.cxx,v
retrieving revision 1.16
diff -u -p -r1.16 ecosconfig.cxx
--- configtool/standalone/common/ecosconfig.cxx 13 Aug 2008 09:37:07 -0000 1.16
+++ configtool/standalone/common/ecosconfig.cxx 15 Aug 2008 16:48:58 -0000
@@ -42,6 +42,7 @@
//==========================================================================
#ifndef _MSC_VER
+#include <cstring>
#include <sys/param.h>
#include <unistd.h> /* for realpath() */
#endif
@@ -55,7 +56,7 @@
#define TOOL_VERSION "2.net"
#define TOOL_COPYRIGHT "Copyright (c) 2002 Red Hat, Inc.\nCopyright (c) 2004-2008 eCosCentric Limited"
#define DEFAULT_SAVE_FILE "ecos.ecc"
-static char* tool = "ecosconfig";
+static const char* tool = "ecosconfig";
int main (int argc, char * argv []) {
Index: configtool/common/common/build.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/common/common/build.cxx,v
retrieving revision 1.19
diff -u -p -r1.19 build.cxx
--- configtool/common/common/build.cxx 13 Aug 2008 09:37:07 -0000 1.19
+++ configtool/common/common/build.cxx 15 Aug 2008 16:49:14 -0000
@@ -98,6 +98,7 @@ std::string replace_char (const std::str
return output;
}
+#if defined(_WIN32) || defined(__CYGWIN__)
// convert a filepath into a vector of path components
static void path_to_vector (std::string input, std::vector <std::string> & output) {
std::string component;
@@ -116,7 +117,6 @@ static void path_to_vector (std::string
// eliminate spaces from a DOS filepath by substituting the
// short form of path components containing spaces
-#if defined(_WIN32) || defined(__CYGWIN__)
std::string nospace_path (const std::string input) {
// split the path into a vector of path components
std::vector <std::string> long_path_vector;