diff --git a/CMakeLists.txt b/CMakeLists.txt index 5213015..09b8266 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ set(SOURCE ${LATEX_SOURCES} ) +add_compile_options(-Wall) add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c) add_dependencies(${PROJECT_NAME} glib-resources) diff --git a/gds-parser/gds-parser.c b/gds-parser/gds-parser.c index b43006e..785aad4 100644 --- a/gds-parser/gds-parser.c +++ b/gds-parser/gds-parser.c @@ -610,6 +610,19 @@ int parse_gds_from_file(const char *filename, GList **library_list) } switch (rec_type) { + + case HEADER: + case UNITS: + case ENDLIB: + case ENDSTR: + case BOUNDARY: + case PATH: + case SREF: + case ENDEL: + case BOX: + case INVALID: + break; + case BGNLIB: /* Parse date record */ gds_parse_date(workbuff, read, ¤t_lib->mod_time, ¤t_lib->access_time); diff --git a/layer-selector.c b/layer-selector.c index 13b0e45..93e534f 100644 --- a/layer-selector.c +++ b/layer-selector.c @@ -29,13 +29,6 @@ static GtkWidget *global_load_button; static GtkWidget *global_save_button; static GtkListBox *global_list_box; -static void delete_layer_widget(GtkWidget *widget) -{ - - gtk_widget_destroy(widget); -} - - void delete_layer_info_struct(struct layer_info *info) { if (info) @@ -271,7 +264,6 @@ static void load_layer_mapping_from_file(gchar *file_name) char *name; gboolean export; int layer; - int target_layer; GdkRGBA color; int result; GList *rows; @@ -295,15 +287,13 @@ static void load_layer_mapping_from_file(gchar *file_name) gtk_container_remove(GTK_CONTAINER(global_list_box), GTK_WIDGET(le)); } - target_layer = 0; - while((result = load_csv_line(dstream, &export, &name, &layer, &color)) >= 0) { /* skip broken line */ if (result == 1) continue; /* Add rows in the same order as in file */ - if (le = find_layer_element_in_list(rows, layer)) { + if ((le = find_layer_element_in_list(rows, layer))) { gtk_list_box_insert(global_list_box, GTK_WIDGET(le), -1); layer_element_set_color(le, &color); diff --git a/tree-renderer/tree-store.c b/tree-renderer/tree-store.c index d111055..aae8af0 100644 --- a/tree-renderer/tree-store.c +++ b/tree-renderer/tree-store.c @@ -8,10 +8,8 @@ static gboolean tree_sel_func(GtkTreeSelection *selection, gboolean path_currently_selected, gpointer data) { - static int cnt = 0; GtkTreeIter iter; struct gds_cell *cell; - gchar *p; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, CELL_SEL_CELL, &cell, -1);