summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>2022-08-30 13:30:45 +0200
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>2022-08-30 15:14:20 +0200
commit9279593543065d1453cf83d217b5b385ca2b506d (patch)
treef658a865007872d34bd37e1f720a50dad1c15dc0
parent691760ef01179348bd0df1e7ee6da38e6f88d3de (diff)
downloadnavit-9279593543065d1453cf83d217b5b385ca2b506d.tar.gz
Fix:gui:qt5_qml: Fix -Wunused-variable
this fixes the warnings: backend.cpp:176:25: warning: unused variable ‘nav’ [-Wunused-variable] 176 | struct navigation * nav = NULL; | ^~~
-rw-r--r--navit/gui/qt5_qml/backend.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/navit/gui/qt5_qml/backend.cpp b/navit/gui/qt5_qml/backend.cpp
index 11057c76c..af1b42aa5 100644
--- a/navit/gui/qt5_qml/backend.cpp
+++ b/navit/gui/qt5_qml/backend.cpp
@@ -63,16 +63,13 @@ void Backend::showMenu(struct point *p) {
* @returns nothing
*/
void Backend::get_maps() {
- struct attr attr, on, off, description, type, data, active;
+ struct attr attr, description, type, data, active;
char * label;
bool is_active;
struct attr_iter * iter;
_maps.clear();
iter = navit_attr_iter_new(NULL);
- on.type = off.type = attr_active;
- on.u.num = 1;
- off.u.num = 0;
while (navit_get_attr(this->nav, attr_map, &attr, iter)) {
if (map_get_attr(attr.u.map, attr_description, &description, NULL)) {
label = g_strdup(description.u.str);
@@ -159,7 +156,6 @@ void Backend::set_engine(QQmlApplicationEngine * engine) {
* @returns 0 if the item should be discarded, 1 otherwise
*/
int Backend::filter_pois(struct item *item) {
- enum item_type *types;
enum item_type type=item->type;
if (type >= type_line)
return 0;
@@ -173,7 +169,6 @@ int Backend::filter_pois(struct item *item) {
*/
void Backend::get_bookmarks() {
struct attr attr,mattr;
- struct navigation * nav = NULL;
struct item *item;
struct coord c;
struct pcoord pc;