diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-08-19 19:56:48 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-08-19 19:56:48 +0000 |
commit | c117ec6d1fdf6e0831e7b74edeacf5013da35353 (patch) | |
tree | d06517c92fa9d42c5d63f70715dcf09dba56eb9a /navit/graphics/qt_qpainter | |
parent | 393627546f5eaa13e2ea5c106b6b3eee0be4b6a6 (diff) | |
download | navit-c117ec6d1fdf6e0831e7b74edeacf5013da35353.tar.gz |
Fix:graphics/qt_qpainter:Fix warnings for treating string literals as writable.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5579 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/graphics/qt_qpainter')
-rw-r--r-- | navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp index 244948511..6562d880d 100644 --- a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp +++ b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp @@ -607,7 +607,7 @@ static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode) static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h,int alpha, int wraparound); static int argc=1; -static char *argv[]={(char *)"navit",NULL,NULL}; +static char *argv[]={NULL,NULL,NULL}; static int fullscreen(struct window *win, int on) @@ -951,10 +951,13 @@ static struct graphics_priv * graphics_qt_qpainter_new(struct navit *nav, struct else QApplication::setGraphicsSystem("raster"); #endif + argv[0]=(char*)malloc(255); + strcpy(argv[0], "navit"); if ((attr=attr_search(attrs, NULL, attr_flags))) ret->flags=attr->u.num; if (ret->flags & 1) { - argv[1]="-qws"; + argv[1]=(char*)malloc(255); + strcpy(argv[1], "-qws"); argc++; } #ifndef QT_QPAINTER_NO_APP |