diff options
author | Stefan Wildemann <metalstrolch@users.noreply.github.com> | 2019-10-30 02:03:04 +0100 |
---|---|---|
committer | Pierre GRANDIN <pgrandin@users.noreply.github.com> | 2019-10-29 19:03:04 -0600 |
commit | 10f514af97b3491072a172b3e0f3e78de455bfb3 (patch) | |
tree | f69b02446ffd41ea8eb37e65e6d5def590bb963d /navit/main.c | |
parent | c62df58958a3a086521b9a6796c6c793f4f68d57 (diff) | |
download | navit-10f514af97b3491072a172b3e0f3e78de455bfb3.tar.gz |
fix:all:fix compiler warnings (#935)
* fix:core:remove many compiler warnings from core
Diffstat (limited to 'navit/main.c')
-rw-r--r-- | navit/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/navit/main.c b/navit/main.c index 898fb9dca..84ec577aa 100644 --- a/navit/main.c +++ b/navit/main.c @@ -358,7 +358,12 @@ void main_init(const char *program) { if (file_exists("navit.c") || file_exists("navit.o") || file_exists("navit.lo") || file_exists("version.h")) { char buffer[PATH_MAX]; printf("%s",_("Running from source directory\n")); - getcwd(buffer, PATH_MAX); /* libc of navit returns "dummy" */ + if(getcwd(buffer, PATH_MAX)==NULL) { /*libc of navit returns "dummy" */ + printf("%s",_("Error getting current path. use ./ \n")); + buffer[0]='.'; + buffer[1]='/'; + buffer[2]=0; + } setenv("NAVIT_PREFIX", buffer, 0); main_setup_environment(0); } else { |