diff options
author | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-03-19 09:31:00 +0000 |
---|---|---|
committer | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-03-19 09:31:00 +0000 |
commit | 444e54ef8c640ecaf29becacc67d4abf3e259451 (patch) | |
tree | 6f1713a2acac8bf8e9a632a64b95ffe52134feb0 /navit | |
parent | 9f2b2f7b8e3b095bfc8bdc53d22c2a54d9206247 (diff) | |
download | navit-444e54ef8c640ecaf29becacc67d4abf3e259451.tar.gz |
Fix:core:Fixed some warnings
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4369 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r-- | navit/graphics.c | 2 | ||||
-rw-r--r-- | navit/main.c | 7 | ||||
-rw-r--r-- | navit/support/glib/fake.c | 11 | ||||
-rw-r--r-- | navit/support/glib/fake.h | 8 |
4 files changed, 18 insertions, 10 deletions
diff --git a/navit/graphics.c b/navit/graphics.c index 95a57fa95..cc9d2d44f 100644 --- a/navit/graphics.c +++ b/navit/graphics.c @@ -1647,7 +1647,6 @@ void graphics_draw_text_std(struct graphics *this_, int text_size, char *text, s char * graphics_icon_path(char *icon) { - static char *navit_sharedir; char *ret=NULL; struct file_wordexp *wordexp=NULL; dbg(1,"enter %s\n",icon); @@ -1669,6 +1668,7 @@ graphics_icon_path(char *icon) // ret=g_strdup_printf("res/drawable-%s/%s",android_density ,icon); ret=g_strdup_printf("res/drawable/%s" ,icon); #else + static char *navit_sharedir; if (! navit_sharedir) navit_sharedir = getenv("NAVIT_SHAREDIR"); ret=g_strdup_printf("%s/xpm/%s", navit_sharedir, icon); diff --git a/navit/main.c b/navit/main.c index d33e97800..3db493201 100644 --- a/navit/main.c +++ b/navit/main.c @@ -307,20 +307,17 @@ char *nls_table[][3]={ static void win_set_nls(void) { - wchar_t wcountry[32],wlang[32]; char country[32],lang[32]; int i=0; #ifdef HAVE_API_WIN32_CE + wchar_t wcountry[32],wlang[32]; GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, wlang, sizeof(wlang)); WideCharToMultiByte(CP_ACP,0,wlang,-1,lang,sizeof(lang),NULL,NULL); -#else - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, lang, sizeof(lang)); -#endif -#ifdef HAVE_API_WIN32_CE GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVCTRYNAME, wcountry, sizeof(wcountry)); WideCharToMultiByte(CP_ACP,0,wcountry,-1,country,sizeof(country),NULL,NULL); #else + GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, lang, sizeof(lang)); GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVCTRYNAME, country, sizeof(country)); #endif while (nls_table[i][0]) { diff --git a/navit/support/glib/fake.c b/navit/support/glib/fake.c index 81e92ce88..b854f99e3 100644 --- a/navit/support/glib/fake.c +++ b/navit/support/glib/fake.c @@ -17,8 +17,13 @@ #include <stdio.h> /* fputs/fprintf */ -char * -g_convert(char *in) +char* g_convert (const char *in, + int len, + const char *to_codeset, + const char *from_codeset, + int *bytes_read, + int *bytes_written, + void **error) { return g_strdup(in); } @@ -49,7 +54,7 @@ g_private_new_navit () int dwTlsIndex; if ((dwTlsIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES) - printf(0, "TlsAlloc failed"); + printf("TlsAlloc failed"); printf("return dwTlsIndex = 0x%x\n",dwTlsIndex); return dwTlsIndex; #else diff --git a/navit/support/glib/fake.h b/navit/support/glib/fake.h index 44e79b912..df6ae58a5 100644 --- a/navit/support/glib/fake.h +++ b/navit/support/glib/fake.h @@ -34,7 +34,13 @@ # endif #endif - +char* g_convert (const char *str, + int len, + const char *to_codeset, + const char *from_codeset, + int *bytes_read, + int *bytes_written, + void **error); #define G_LOCK_DEFINE_STATIC(name) //void #define G_LOCK(name) //void //g_mutex_lock (&G_LOCK_NAME (name)) #define G_UNLOCK(name) //void //g_mutex_unlock (&G_LOCK_NAME (name)) |