Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 2178) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 2179) @@ -53,16 +53,6 @@ /* --------------------------------------------------------------------------- * Parse the directory tree where newlib footprints are found */ - -/* Helper function for ParseLibraryTree */ -static const char *pcb_basename(const char *p) -{ - char *rv = strrchr(p, '/'); - if (rv) - return rv + 1; - return p; -} - typedef struct list_dir_s list_dir_t; struct list_dir_s { @@ -124,9 +114,7 @@ struct dirent *subdirentry; /* Individual subdir entry */ struct stat buffer; /* Buffer used in stat */ size_t l; - size_t len; int n_footprints = 0; /* Running count of footprints found in this subdir */ - char *full_path; /* Cache old dir, then cd into subdir because stat is given relative file names. */ memset(olddir, 0, sizeof olddir); @@ -174,7 +162,6 @@ /* printf("... Examining file %s ... \n", subdirentry->d_name); */ #endif - /* Ignore non-footprint files found in this directory * We're skipping .png and .html because those * may exist in a library tree to provide an html browsable @@ -233,7 +220,6 @@ char working_[MAXPATHLEN + 1]; const char *visible_subdir; char *working; /* String holding abs path to working dir */ - int menuidx; sprintf(working_, "%s%c%s", toppath, PCB_DIR_SEPARATOR_C, subdir); resolve_path(working_, &working, 0); @@ -298,7 +284,6 @@ /* TODO: make this static */ char *fp_fs_search(const char *search_path, const char *basename, int parametric) { - int found; const char *p, *end; char path[MAXPATHLEN + 1]; fp_search_t ctx; @@ -313,7 +298,7 @@ /* fprintf("Looking for %s\n", ctx.target);*/ - for (p = search_path; end = strchr(p, ':'); p = end + 1) { + for (p = search_path; (end = strchr(p, ':')) != NULL; p = end + 1) { char *fpath; memcpy(path, p, end - p); path[end - p] = '\0';