diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-08-31 18:13:34 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-08-31 18:13:44 -0400 |
commit | 9af9d28a46452e2c1a41544f97ea5bb51da4965d (patch) | |
tree | 26ccf3eeab4cbf82b6d1e6b4cbaca2ecedaf4b98 /sys-fs/e2tools/files/e2tools-0.0.16-prototypes.patch | |
parent | sys-fs/e2tools: set up a sane default CC (diff) | |
download | gentoo-9af9d28a46452e2c1a41544f97ea5bb51da4965d.tar.gz gentoo-9af9d28a46452e2c1a41544f97ea5bb51da4965d.tar.bz2 gentoo-9af9d28a46452e2c1a41544f97ea5bb51da4965d.zip |
sys-fs/e2tools: fix various build time warnings
Diffstat (limited to 'sys-fs/e2tools/files/e2tools-0.0.16-prototypes.patch')
-rw-r--r-- | sys-fs/e2tools/files/e2tools-0.0.16-prototypes.patch | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/sys-fs/e2tools/files/e2tools-0.0.16-prototypes.patch b/sys-fs/e2tools/files/e2tools-0.0.16-prototypes.patch new file mode 100644 index 000000000000..39a9ddb7daad --- /dev/null +++ b/sys-fs/e2tools/files/e2tools-0.0.16-prototypes.patch @@ -0,0 +1,167 @@ +fix various missing prototype warnings + +--- a/e2tools.h ++++ b/e2tools.h +@@ -63,38 +63,33 @@ + #define E2T_FORCE 1 + #define E2T_DO_MV 2 + +-#ifndef COPY_C ++/* copy.c */ + extern long copy(int argc, char *argv[]); + extern int my_strcmp(const void *n1, const void *n2); +-#endif + +-#ifdef LN_C ++/* ln.c */ + extern long do_ln(int argc, char *argv[]); + + extern long create_hard_link(ext2_filsys fs, ext2_ino_t cwd, ext2_ino_t + new_file_ino, char *newfile, int ln_flags); +-#endif + +-#ifndef LS_C ++/* ls.c */ + extern long do_list_dir(int argc, char *argv[]); +-#endif + +-#ifndef MKDIR_C ++/* mkdir.c */ + extern long e2mkdir(int argc, char *argv[]); + extern long create_dir(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd, + char *dirname, struct stat *def_stat); +-#endif ++extern long change_cwd(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd, ++ char *dirname); + +-#ifdef MV_C ++/* mv.c */ + extern long do_mv(int argc, char *argv[]); + extern long get_file_parts(ext2_filsys fs, ext2_ino_t root, char *pathname, + ext2_ino_t *dir_ino, char **dir_name, + char **base_name); + +-#endif +- +- +-#ifndef READ_C ++/* read.c */ + extern long get_file(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd, + char *infile, char *outfile, int keep); + extern long retrieve_data(ext2_filsys fs, ext2_ino_t src, int dest_fd, +@@ -102,17 +97,14 @@ extern long retrieve_data(ext2_filsys fs, ext2_ino_t src, int dest_fd, + ext2_off_t *ret_pos); + extern long read_to_eof(ext2_file_t infile, int dest_fd, ext2_off_t offset, + ext2_off_t *ret_pos); +-#endif + +-#ifndef RM_C ++/* rm.c */ + extern long e2rm(int argc, char *argv[]); +-#endif + +-#ifndef TAIL_C ++/* tail.c */ + extern long do_tail(int argc, char *argv[]); +-#endif + +-#ifndef UTIL_C ++/* util.c */ + extern mode_t ext2_mode_xlate(__u16 lmode); + extern __u16 host_mode_xlate(mode_t hmode); + extern long open_filesystem(char *name, ext2_filsys *fs, ext2_ino_t *root, int +@@ -125,13 +117,14 @@ extern long rm_file(ext2_filsys fs, ext2_ino_t cwd, char *outfile, ext2_ino_t + delfile); + extern long delete_file(ext2_filsys fs, ext2_ino_t inode); + extern void init_stat_buf(struct stat *buf); +-#endif ++#include <regex.h> ++extern regex_t *make_regexp(char *shell); ++extern int is_file_regexp(char *ptr); + +-#ifndef WRITE_C ++/* write.c */ + extern long + put_file(ext2_filsys fs, ext2_ino_t cwd, char *infile, char *outfile, + ext2_ino_t *outfile_ino, int keep, struct stat *def_stat); +-#endif + + #endif + +--- a/elist.c ++++ b/elist.c +@@ -41,12 +41,9 @@ + /* Feature Test Switches */ + /* Headers */ + #include <memory.h> ++#include <stdlib.h> + #include "elist.h" + +-#ifndef NULL +-#define NULL ((void *)0) +-#endif +- + elist_t * + elist_new() + { +--- a/ls.c ++++ b/ls.c +@@ -703,7 +703,7 @@ void short_disp(ls_file_t *info, int *col, int options) + char lbr, rbr; + char tmp[300]; + int thislen; +- static max_col_size = 0; ++ static int max_col_size = 0; + + if (max_col_size == 0) + { +--- a/mkdir.c ++++ b/mkdir.c +@@ -357,7 +357,7 @@ create_dir(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd, + def_stat))) + { + fprintf(stderr, +- "create_dir: error creating directory %s/%s:%d\n", ++ "create_dir: error creating directory %s/%s:%ld\n", + dirname, dname, retval); + ext2fs_free_mem((void **) &buf); + return(retval); +@@ -415,7 +415,7 @@ create_dir(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd, + if ((retval = create_subdir(fs, root, cwd, dirname, def_stat))) + { + fprintf(stderr, +- "create_dir: error creating directory %s:%d\n", ++ "create_dir: error creating directory %s:%ld\n", + dirname, retval); + return(retval); + } +--- a/progress.c ++++ b/progress.c +@@ -26,6 +26,8 @@ + /* Feature Test Switches */ + /* System Headers */ + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + #include <unistd.h> + #include <sys/stat.h> + #include <sys/time.h> +@@ -154,7 +156,7 @@ void update_progress(unsigned long num_bytes) + if (prog_sbuf != NULL && prog_time != tv.tv_sec) + { + prog_time = tv.tv_sec; +- fprintf(stderr, "%s %10d / %10d\r", prog_file, num_bytes, ++ fprintf(stderr, "%s %10lu / %10jd\r", prog_file, num_bytes, + prog_sbuf->st_size); + fflush(stderr); + } +--- a/rm.c ++++ b/rm.c +@@ -244,7 +244,6 @@ e2rm(int argc, char *argv[]) + retval = ext2fs_dir_iterate2(gbl_fs, curr_ino, + DIRENT_FLAG_INCLUDE_EMPTY, 0, + rm_dir_proc, +- (void *) + (verbose) ? &verbose : NULL); + } + else |