Gcc warns of unused variables and functions when building with -Wextra
-Wall. The attached patch remove the unused variables and one function.
Should they be removed, or kept?
common/str.cpp | 1 -
linux/dialogs.cpp | 13 +------------
2 files changed, 1 insertion(+), 13 deletions(-)
--
Happy hacking
Petter Reinholdtsen
diff --git a/common/str.cpp b/common/str.cpp
index 78313df..0749ca9 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -198,7 +198,6 @@ bool String::Match(const String& Expression) const
}
else if (*p == '(')
{
- const char* Start = p;
int c = 0;
// Skip what's inside the parenthesis.
diff --git a/linux/dialogs.cpp b/linux/dialogs.cpp
index 6eecccb..89bb0c8 100644
--- a/linux/dialogs.cpp
+++ b/linux/dialogs.cpp
@@ -2484,20 +2484,9 @@ static void librarydlg_treefocus (GtkCTree *ctree, GtkCTreeNode *row, gint colum
static GtkWidget *last_dlg = NULL;
-static void librarydlg_command (GtkWidget *widget, gpointer data)
-{
- GtkWidget *parent = gtk_widget_get_toplevel (widget);
- LibraryDialog *dlg = (LibraryDialog*) gtk_object_get_data (GTK_OBJECT (parent), "menu_file_import_piece");
- int id = GPOINTER_TO_INT (data);
-
- dlg = (LibraryDialog *)last_dlg;
-
- dlg->HandleCommand (id);
-}
-
int librarydlg_execute (void *param)
{
- GtkWidget *dlg, *vbox, *clist, *scr, *ctree, *hsplit, *item, *menu, *menubar, *handle;
+ GtkWidget *dlg, *vbox, *clist, *scr, *ctree, *hsplit, *menu, *menubar, *handle;
GtkAccelGroup *accel;
int loop = 1, ret = LC_CANCEL;
lcPiecesLibrary *lib = g_App->GetPiecesLibrary();
_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad