From 9279593543065d1453cf83d217b5b385ca2b506d Mon Sep 17 00:00:00 2001 From: Bastian Koppelmann Date: Tue, 30 Aug 2022 13:30:45 +0200 Subject: Fix:gui:qt5_qml: Fix -Wunused-variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this fixes the warnings: backend.cpp:176:25: warning: unused variable ‘nav’ [-Wunused-variable] 176 | struct navigation * nav = NULL; | ^~~ --- navit/gui/qt5_qml/backend.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'navit') 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; -- cgit v1.2.1