Index: trunk/src/compat_misc.c =================================================================== --- trunk/src/compat_misc.c (revision 2104) +++ trunk/src/compat_misc.c (revision 2105) @@ -83,6 +83,7 @@ } memcpy(fab_author, gecos, len); fab_author[len] = 0; + return fab_author; #else return "Unknown"; #endif Index: trunk/src/conf_act.c =================================================================== --- trunk/src/conf_act.c (revision 2104) +++ trunk/src/conf_act.c (revision 2105) @@ -133,7 +133,6 @@ else if (NSTRCMP(cmd, "reset") == 0) { conf_role_t role; - int res; role = conf_role_parse(argv[1]); if (role == CFR_invalid) { Message("Invalid role: '%s'", argv[1]); Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 2104) +++ trunk/src/draw.c (revision 2105) @@ -898,7 +898,7 @@ color = i->layer->Color; gui->set_color(Output.fgGC, color); - if (gui->thindraw_pcb_polygon != NULL && conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly) + if ((gui->thindraw_pcb_polygon != NULL) && (conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly)) gui->thindraw_pcb_polygon(Output.fgGC, polygon, i->drawn_area); else gui->fill_pcb_polygon(Output.fgGC, polygon, i->drawn_area); Index: trunk/src/event.c =================================================================== --- trunk/src/event.c (revision 2104) +++ trunk/src/event.c (revision 2105) @@ -88,7 +88,6 @@ void event(event_id_t ev, const char *fmt, ...) { va_list ap; - const char *f; event_arg_t argv[EVENT_MAX_ARG], *a; event_t *e; int argc; Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 2104) +++ trunk/src/gui_act.c (revision 2105) @@ -799,7 +799,6 @@ if (SearchObjectByID(PCB->Data, &ptr1, &ptr2, &ptr3, Crosshair.drags[Crosshair.drags_current], LINE_TYPE) != NO_TYPE) { /* line has two endpoints, check which one is close to the original x;y */ LineType *l = ptr2; - long int d1, d2; if (close_enough(Note.X, l->Point1.X) && close_enough(Note.Y, l->Point1.Y)) { Crosshair.AttachedObject.Type = LINEPOINT_TYPE; Crosshair.AttachedObject.Ptr1 = ptr1; Index: trunk/src/hid_actions.c =================================================================== --- trunk/src/hid_actions.c (revision 2104) +++ trunk/src/hid_actions.c (revision 2105) @@ -106,12 +106,12 @@ } } -HID_Action *hid_remove_action(const HID_Action * a) +void hid_remove_action(const HID_Action * a) { htsp_entry_t *e; if (all_actions == NULL) - return NULL; + return; e = htsp_popentry(all_actions, a->name); if (e != NULL) { @@ -123,7 +123,6 @@ const HID_Action *hid_find_action(const char *name) { hid_cookie_action_t *ca; - int i; if ((name == NULL) && (all_actions == NULL)) return 0; @@ -183,7 +182,6 @@ void dump_actions(void) { - int i; htsp_entry_t *e; fprintf(stderr, "Registered Actions:\n"); Index: trunk/src/hid_actions.h =================================================================== --- trunk/src/hid_actions.h (revision 2104) +++ trunk/src/hid_actions.h (revision 2105) @@ -12,7 +12,7 @@ const HID_Action *hid_find_action(const char *name); extern void hid_remove_actions(const HID_Action * a, int n); -extern HID_Action *hid_remove_action(const HID_Action * a); +extern void hid_remove_action(const HID_Action * a); extern void hid_remove_actions_by_cookie(const char *cookie); int hid_action(const char *action_); Index: trunk/src/hid_cfg.c =================================================================== --- trunk/src/hid_cfg.c (revision 2104) +++ trunk/src/hid_cfg.c (revision 2105) @@ -326,7 +326,6 @@ lht_node_t *hid_cfg_menu_field(const lht_node_t *submenu, hid_cfg_menufield_t field, const char **field_name) { - lht_node_t *n; lht_err_t err; const char *fieldstr = NULL; Index: trunk/src/hid_cfg_action.c =================================================================== --- trunk/src/hid_cfg_action.c (revision 2104) +++ trunk/src/hid_cfg_action.c (revision 2105) @@ -42,6 +42,7 @@ return -1; } return 0; + default: ; /* suppress compiler warning: can't handle any other type */ } return -1; } Index: trunk/src/hid_cfg_input.c =================================================================== --- trunk/src/hid_cfg_input.c (revision 2104) +++ trunk/src/hid_cfg_input.c (revision 2105) @@ -169,6 +169,7 @@ int hid_cfg_keys_init(hid_cfg_keys_t *km) { htip_init(&km->keys, keyhash_int, keyeq_int); + return 0; } int hid_cfg_keys_uninit(hid_cfg_keys_t *km) @@ -175,6 +176,7 @@ { #warning TODO: recursive free of nodes htip_uninit(&km->keys); + return 0; } hid_cfg_keyseq_t *hid_cfg_keys_add_under(hid_cfg_keys_t *km, hid_cfg_keyseq_t *parent, hid_cfg_mod_t mods, unsigned short int key_char, int terminal) @@ -245,7 +247,7 @@ static int parse_keydesc(hid_cfg_keys_t *km, const char *keydesc, hid_cfg_mod_t *mods, unsigned short int *key_chars, int arr_len) { const char *curr, *next, *last, *k; - int n, slen, len; + int slen, len; slen = 0; curr = keydesc; @@ -362,7 +364,6 @@ { hid_cfg_mod_t mods[HIDCFG_MAX_KEYSEQ_LEN]; unsigned short int key_chars[HIDCFG_MAX_KEYSEQ_LEN]; - hid_cfg_keyseq_t *lasts; int slen, n; slen = parse_keydesc(km, keydesc, mods, key_chars, HIDCFG_MAX_KEYSEQ_LEN); @@ -402,7 +403,7 @@ break; case LHT_LIST: { - int ret = -1, cnt; + int cnt; lht_node_t *n; for(n = keydescn->data.list.first, cnt = 0; n != NULL; n = n->next, cnt++, mask >>= 1) { if (n->type != LHT_TEXT) Index: trunk/src/hid_flags.c =================================================================== --- trunk/src/hid_flags.c (revision 2104) +++ trunk/src/hid_flags.c (revision 2105) @@ -21,8 +21,6 @@ int hid_get_flag(const char *name) { - static char *buf = 0; - static int nbuf = 0; const char *cp; if (name == NULL) @@ -54,7 +52,6 @@ buff[len] = '\0'; a = hid_find_action(buff); if (!a) { - int i; Message("hid_get_flag: no action %s\n", name); return -1; } Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 2104) +++ trunk/src/main.c (revision 2105) @@ -103,7 +103,6 @@ static void InitPaths(char *argv0) { size_t l; - int i; int haspath; char *t1, *t2; int found_bindir = 0; @@ -217,7 +216,6 @@ void pcb_main_uninit(void) { int i; - char **s; UninitBuffers(); @@ -269,8 +267,8 @@ DO_EXPORT, DO_GUI } do_what = DO_SOMETHING; - int i, n, hid_argc = 0; - char *cmd, *arg, *stmp, *hid_name = NULL, **hid_argv; + int n, hid_argc = 0; + char *cmd, *arg, *hid_name = NULL, **hid_argv; const char **cs; const char *main_action = NULL; char *command_line_pcb = NULL; Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 2104) +++ trunk/src/main_act.c (revision 2105) @@ -47,6 +47,7 @@ int ActionPrintActions(int argc, char **argv, Coord x, Coord y) { print_actions(); + return 0; } /* --------------------------------------------------------------------------- */ @@ -57,6 +58,7 @@ int ActionDumpActions(int argc, char **argv, Coord x, Coord y) { dump_actions(); + return 0; } /* print usage lines */ @@ -111,7 +113,6 @@ static int help_invoc(void) { HID **hl = hid_enumerate(); - HID_AttrNode *ha; int i; int n_printer = 0, n_gui = 0, n_exporter = 0; @@ -168,6 +169,7 @@ } else help0(); + return 0; } @@ -179,6 +181,7 @@ int ActionPrintVersion(int argc, char **argv, Coord x, Coord y) { printf("PCB version %s\n", VERSION); + return 0; } /* --------------------------------------------------------------------------- */ @@ -207,6 +210,7 @@ " You should have received a copy of the GNU General Public License\n" " along with this program; if not, write to the Free Software\n" " Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n", Progname, VERSION); + return 0; } /* --------------------------------------------------------------------------- */ @@ -238,6 +242,7 @@ printf("rc/default_font_file ="); print_list(&conf_core.rc.default_font_file); printf("rc/library_search_paths ="); print_list(&conf_core.rc.library_search_paths); printf("rc/library_shell = \"%s\"\n", conf_core.rc.library_shell); + return 0; } Index: trunk/src/paths.c =================================================================== --- trunk/src/paths.c (revision 2104) +++ trunk/src/paths.c (revision 2105) @@ -11,7 +11,7 @@ { const char *subst_to; int subst_offs; - for (out; numpaths > 0; numpaths--, in++, out++) { + for (; numpaths > 0; numpaths--, in++, out++) { if (*in != NULL) { if (**in == '~') { int l1, l2; Index: trunk/src/pcb-printf.c =================================================================== --- trunk/src/pcb-printf.c (revision 2104) +++ trunk/src/pcb-printf.c (revision 2105) @@ -544,7 +544,6 @@ int pcb_printf(const char *fmt, ...) { int rv; - char *tmp; gds_t str; gds_init(&str); Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 2104) +++ trunk/src/plug_footprint.c (revision 2105) @@ -106,6 +106,7 @@ { FILE *res = NULL; HOOK_CALL(plug_fp_t, plug_fp_chain, fopen, res, != NULL, path, name, fctx); + return res; } void fp_fclose(FILE * f, fp_fopen_ctx_t *fctx) @@ -117,7 +118,6 @@ library_t *fp_append_entry(library_t *parent, const char *name, fp_type_t type, void *tags[]) { library_t *entry; /* Pointer to individual menu entry */ - size_t len; assert(parent->type == LIB_DIR); entry = get_library_memory(parent); @@ -256,6 +256,7 @@ if (l->data.fp.tags != NULL) free(l->data.fp.tags); break; + case LIB_INVALID: break; /* suppress compiler warning */ } if (l->name != NULL) { free(l->name); @@ -285,7 +286,7 @@ fp_free_entry(dir); if (parent != NULL) { for(n = 0, l = parent->data.dir.children.array; n < parent->data.dir.children.used; n++,l++) { - if (l = dir) { + if (l == dir) { vtlib_remove(&(parent->data.dir.children), n, 1); break; } Index: trunk/src/plug_footprint_host.c =================================================================== --- trunk/src/plug_footprint_host.c (revision 2104) +++ trunk/src/plug_footprint_host.c (revision 2105) @@ -62,9 +62,6 @@ char toppath[MAXPATHLEN + 1]; /* String holding abs path to top level library dir */ char *libpaths; /* String holding list of library paths to search */ char *p; /* Helper string used in iteration */ - DIR *dirobj; /* Iterable directory object */ - struct dirent *direntry = NULL; /* Object holding individual directory entries */ - struct stat buffer; /* buffer used in stat */ int n_footprints = 0; /* Running count of footprints found */ int res; @@ -112,9 +109,9 @@ { if (fpds_inited) gds_uninit(&fpds_paths); + return 0; } - int fp_read_lib_all(void) { FILE *resultFP = NULL; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 2104) +++ trunk/src/plug_io.c (revision 2105) @@ -605,7 +605,8 @@ char *build_fn(const char *template) { gds_t s; - char *next, *curr, buff[16]; + char buff[16]; + const char *curr, *next; gds_init(&s); for(curr = template;;) { Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 2104) +++ trunk/src/rats_patch.c (revision 2105) @@ -360,6 +360,7 @@ break; } } + return 0; } /* ---------------------------------------------------------------- */ @@ -423,6 +424,7 @@ } } END_LOOP; + return 0; } static const char savepatch_syntax[] = "SavePatch(filename)";