summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
authorrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-04-23 18:45:28 +0000
committerrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-04-23 18:45:28 +0000
commit117bd3ce5ec2a143f4735403d53792a165ac14b8 (patch)
treef6299dc9cc97ad263d60ca81c0dd05af4b591c8f /navit
parent7de15581398bea00e0f593e4c182caf2e87e320c (diff)
downloadnavit-117bd3ce5ec2a143f4735403d53792a165ac14b8.tar.gz
Fix:Core:Fix some warnings
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5035 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r--navit/file.c2
-rw-r--r--navit/graphics/null/graphics_null.c1
-rw-r--r--navit/graphics/win32/graphics_win32.c4
-rw-r--r--navit/graphics/win32/xpm2bmp.c2
-rw-r--r--navit/map/filter/filter.c2
-rw-r--r--navit/maptool/google/protobuf-c/protobuf-c.c2
-rw-r--r--navit/maptool/zip.c4
-rw-r--r--navit/navigation.c2
-rw-r--r--navit/support/espeak/tr_languages.c2
-rw-r--r--navit/support/glib/gutils.c5
-rw-r--r--navit/support/libc/locale.h7
-rw-r--r--navit/support/wordexp/wordexp.c1
-rw-r--r--navit/util.c3
13 files changed, 22 insertions, 15 deletions
diff --git a/navit/file.c b/navit/file.c
index ce9dcabef..87a2adf8e 100644
--- a/navit/file.c
+++ b/navit/file.c
@@ -333,7 +333,7 @@ file_mmap(struct file *file)
int mmap_size=file->size;
#endif
#ifdef HAVE_API_WIN32_BASE
- file->begin = (char*)mmap_readonly_win32( file->name, &file->map_handle, &file->map_file );
+ file->begin = (unsigned char*)mmap_readonly_win32( file->name, &file->map_handle, &file->map_file );
#else
file->begin=mmap(NULL, mmap_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, file->fd, 0);
dbg_assert(file->begin != NULL);
diff --git a/navit/graphics/null/graphics_null.c b/navit/graphics/null/graphics_null.c
index 1c3bbbd86..bfa45daf6 100644
--- a/navit/graphics/null/graphics_null.c
+++ b/navit/graphics/null/graphics_null.c
@@ -38,7 +38,6 @@
static struct callback_list* callbacks;
-static int dummy;
static struct graphics_priv {
int dummy;
} graphics_priv;
diff --git a/navit/graphics/win32/graphics_win32.c b/navit/graphics/win32/graphics_win32.c
index 20f7e4272..46bc711b7 100644
--- a/navit/graphics/win32/graphics_win32.c
+++ b/navit/graphics/win32/graphics_win32.c
@@ -957,8 +957,7 @@ static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
}
-
-static void * get_data(struct graphics_priv *this_, char *type)
+static void * get_data(struct graphics_priv *this_, const char *type)
{
if ( strcmp( "wnd_parent_handle_ptr", type ) == 0 )
{
@@ -1515,7 +1514,6 @@ static struct graphics_priv *
return this_;
}
-
static void set_alphablend(struct graphics_priv* gra_priv)
{
#if HAVE_API_WIN32_CE
diff --git a/navit/graphics/win32/xpm2bmp.c b/navit/graphics/win32/xpm2bmp.c
index f208f7e4e..455d69941 100644
--- a/navit/graphics/win32/xpm2bmp.c
+++ b/navit/graphics/win32/xpm2bmp.c
@@ -495,7 +495,7 @@ static int CreateBitmapFromXpm( const char* filename, PXPM2BMP pXpm2bmp )
unsigned char i, row;
char line[ 1024 ];
int nbytes ;
- int padding, rowsize;
+ int padding, rowsize = 0;
FILE* file_xpm = fopen( filename, "r" );
int phase = 0;
diff --git a/navit/map/filter/filter.c b/navit/map/filter/filter.c
index edc6a8470..abad31a35 100644
--- a/navit/map/filter/filter.c
+++ b/navit/map/filter/filter.c
@@ -383,7 +383,7 @@ static struct map_methods map_methods_filter = {
static struct map_priv *
-map_filter_new(struct map_methods *meth, struct attr **attrs)
+map_filter_new(struct map_methods *meth, struct attr **attrs, struct callback_list *cbl)
{
struct map_priv *m=NULL;
struct attr **parent_attrs,type,*subtype=attr_search(attrs, NULL, attr_subtype),*filter=attr_search(attrs, NULL, attr_filter);
diff --git a/navit/maptool/google/protobuf-c/protobuf-c.c b/navit/maptool/google/protobuf-c/protobuf-c.c
index efa5fd30a..885edec0c 100644
--- a/navit/maptool/google/protobuf-c/protobuf-c.c
+++ b/navit/maptool/google/protobuf-c/protobuf-c.c
@@ -1966,10 +1966,12 @@ parse_packed_repeated_member (ScannedMember *scanned_member,
*p_n += count;
return TRUE;
+#if IS_LITTLE_ENDIAN
no_unpacking_needed:
memcpy (array, at, count * siz);
*p_n += count;
return TRUE;
+#endif
}
static protobuf_c_boolean
diff --git a/navit/maptool/zip.c b/navit/maptool/zip.c
index 578f356eb..349bc0241 100644
--- a/navit/maptool/zip.c
+++ b/navit/maptool/zip.c
@@ -150,7 +150,7 @@ write_zipmember(struct zip_info *zip_info, char *name, int filelen, char *data,
unsigned char salt[8], key[34], verify[2], mac[10];
#endif
char filename[filelen+1];
- int error,crc=0,len,comp_size=data_size;
+ int crc=0,len,comp_size=data_size;
uLongf destlen=data_size+data_size/500+12;
char *compbuffer;
@@ -175,7 +175,7 @@ write_zipmember(struct zip_info *zip_info, char *name, int filelen, char *data,
lfh.zipmthd=zip_info->compression_level ? 8:0;
#ifdef HAVE_ZLIB
if (zip_info->compression_level) {
- error=compress2_int((Byte *)compbuffer, &destlen, (Bytef *)data, data_size, zip_info->compression_level);
+ int error=compress2_int((Byte *)compbuffer, &destlen, (Bytef *)data, data_size, zip_info->compression_level);
if (error == Z_OK) {
if (destlen < data_size) {
data=compbuffer;
diff --git a/navit/navigation.c b/navit/navigation.c
index 1ce73eace..cb04af621 100644
--- a/navit/navigation.c
+++ b/navit/navigation.c
@@ -1680,7 +1680,7 @@ show_maneuver(struct navigation *nav, struct navigation_itm *itm, struct navigat
if (!connect) {
ret=g_strdup_printf(_("You have reached your destination %s"), d);
} else {
- ret=g_strdup_printf(_("then you have reached your destination."));
+ ret=g_strdup(_("then you have reached your destination."));
}
}
g_free(d);
diff --git a/navit/support/espeak/tr_languages.c b/navit/support/espeak/tr_languages.c
index 2416755bf..83d1c8041 100644
--- a/navit/support/espeak/tr_languages.c
+++ b/navit/support/espeak/tr_languages.c
@@ -493,7 +493,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.stress_flags = 0x0024; // don't use secondary stress
tr->langopts.param[LOPT_IT_LENGTHEN] = 1; // remove lengthen indicator from unstressed syllables
- tr->langopts.numbers = 0x1509 + 0x8000 + NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL;
+ tr->langopts.numbers = 0x1509 + 0x8000 + (NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL);
SetLetterVowel(tr,'y');
}
break;
diff --git a/navit/support/glib/gutils.c b/navit/support/glib/gutils.c
index 2871e381b..6d3fda447 100644
--- a/navit/support/glib/gutils.c
+++ b/navit/support/glib/gutils.c
@@ -1899,9 +1899,8 @@ static gchar *g_prgname = NULL;
gchar*
g_get_prgname (void)
{
- gchar* retval;
+ gchar* retval =NULL;
-return 0;
// G_LOCK (g_prgname);
//#ifdef G_OS_WIN32
// if (g_prgname == NULL)
@@ -1929,7 +1928,7 @@ return 0;
// retval = g_prgname;
// G_UNLOCK (g_prgname);
//
-// return retval;
+ return retval;
}
/**
diff --git a/navit/support/libc/locale.h b/navit/support/libc/locale.h
index 51d62f3a3..320c3ac2d 100644
--- a/navit/support/libc/locale.h
+++ b/navit/support/libc/locale.h
@@ -1,8 +1,15 @@
#ifndef _LOCALE_H
#define _LOCALE_H 1
+
+#ifndef SUBLANG_BENGALI_BANGLADESH
#define SUBLANG_BENGALI_BANGLADESH 0x02
+#endif
+#ifndef SUBLANG_PUNJABI_PAKISTAN
#define SUBLANG_PUNJABI_PAKISTAN 0x02
+#endif
+#ifndef SUBLANG_ROMANIAN_MOLDOVA
#define SUBLANG_ROMANIAN_MOLDOVA 0x02
+#endif
struct lconv {
char *decimal_point;
};
diff --git a/navit/support/wordexp/wordexp.c b/navit/support/wordexp/wordexp.c
index d2ed3ff28..6b080d1f7 100644
--- a/navit/support/wordexp/wordexp.c
+++ b/navit/support/wordexp/wordexp.c
@@ -12,6 +12,7 @@
#endif /* _MSC_VER */
#include "wordexp.h"
#include "glob.h"
+#include <glib.h>
static int
diff --git a/navit/util.c b/navit/util.c
index 604674754..2574c6e76 100644
--- a/navit/util.c
+++ b/navit/util.c
@@ -518,7 +518,6 @@ spawn_process(char **argv)
#ifdef HAVE_API_WIN32_BASE
{
char *cmdline;
- LPCWSTR cmd,args;
DWORD dwRet;
// For [desktop] Windows it's adviceable not to use
@@ -530,6 +529,7 @@ spawn_process(char **argv)
// no WinCE program has support for quoted strings in arguments.
// So...
#ifdef HAVE_API_WIN32_CE
+ LPWSTR cmd,args;
cmdline=g_strjoinv(" ",argv+1);
args=newSysString(cmdline);
cmd = newSysString(argv[0]);
@@ -537,6 +537,7 @@ spawn_process(char **argv)
dbg(0, "CreateProcess(%s,%s), PID=%i\n",argv[0],cmdline,r->pr.dwProcessId);
g_free(cmd);
#else
+ TCHAR* args;
STARTUPINFO startupInfo;
memset(&startupInfo, 0, sizeof(startupInfo));
startupInfo.cb = sizeof(startupInfo);