diff options
-rw-r--r-- | archival/gunzip.c | 4 | ||||
-rw-r--r-- | archival/uncompress.c | 4 | ||||
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | libbb/xfuncs.c | 2 | ||||
-rw-r--r-- | loginutils/deluser.c | 3 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index 7be94e1b8..a7f5ce481 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c | |||
@@ -48,8 +48,8 @@ int gunzip_main(int argc, char **argv) | |||
48 | 48 | ||
49 | do { | 49 | do { |
50 | struct stat stat_buf; | 50 | struct stat stat_buf; |
51 | const char *old_path = argv[optind]; | 51 | char *old_path = argv[optind]; |
52 | const char *delete_path = NULL; | 52 | char *delete_path = NULL; |
53 | char *new_path = NULL; | 53 | char *new_path = NULL; |
54 | int src_fd; | 54 | int src_fd; |
55 | int dst_fd; | 55 | int dst_fd; |
diff --git a/archival/uncompress.c b/archival/uncompress.c index 8c466ebdf..cbcbcefed 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c | |||
@@ -19,8 +19,8 @@ int uncompress_main(int argc, char **argv) | |||
19 | flags = bb_getopt_ulflags(argc, argv, "cf"); | 19 | flags = bb_getopt_ulflags(argc, argv, "cf"); |
20 | 20 | ||
21 | while (optind < argc) { | 21 | while (optind < argc) { |
22 | const char *compressed_file = argv[optind++]; | 22 | char *compressed_file = argv[optind++]; |
23 | const char *delete_path = NULL; | 23 | char *delete_path = NULL; |
24 | char *uncompressed_file = NULL; | 24 | char *uncompressed_file = NULL; |
25 | int src_fd; | 25 | int src_fd; |
26 | int dst_fd; | 26 | int dst_fd; |
diff --git a/include/libbb.h b/include/libbb.h index cb39e7b3f..dfb7a70bd 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -189,7 +189,7 @@ extern FILE *xfopen(const char *path, const char *mode); | |||
189 | extern int bb_fclose_nonstdin(FILE *f); | 189 | extern int bb_fclose_nonstdin(FILE *f); |
190 | extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; | 190 | extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; |
191 | 191 | ||
192 | extern void xstat(const char * const filename, struct stat *buf); | 192 | extern void xstat(char *filename, struct stat *buf); |
193 | extern int xsocket(int domain, int type, int protocol); | 193 | extern int xsocket(int domain, int type, int protocol); |
194 | extern pid_t spawn(char **argv); | 194 | extern pid_t spawn(char **argv); |
195 | extern pid_t xspawn(char **argv); | 195 | extern pid_t xspawn(char **argv); |
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index e88a5380f..0f0faaf74 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -490,7 +490,7 @@ void xlisten(int s, int backlog) | |||
490 | 490 | ||
491 | #ifdef L_xstat | 491 | #ifdef L_xstat |
492 | /* xstat() - a stat() which dies on failure with meaningful error message */ | 492 | /* xstat() - a stat() which dies on failure with meaningful error message */ |
493 | void xstat(const char * const name, struct stat *stat_buf) | 493 | void xstat(char *name, struct stat *stat_buf) |
494 | { | 494 | { |
495 | if (stat(name, stat_buf)) | 495 | if (stat(name, stat_buf)) |
496 | bb_perror_msg_and_die("Can't stat '%s'", name); | 496 | bb_perror_msg_and_die("Can't stat '%s'", name); |
diff --git a/loginutils/deluser.c b/loginutils/deluser.c index 1b9bc4439..d93a550fa 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c | |||
@@ -60,7 +60,8 @@ static void del_line_matching(const char *login, const char *filename) | |||
60 | 60 | ||
61 | 61 | ||
62 | if ((passwd = bb_wfopen(filename, "r"))) { | 62 | if ((passwd = bb_wfopen(filename, "r"))) { |
63 | xstat(filename, &statbuf); | 63 | // Remove pointless const. |
64 | xstat((char *)filename, &statbuf); | ||
64 | buffer = (char *) xmalloc(statbuf.st_size * sizeof(char)); | 65 | buffer = (char *) xmalloc(statbuf.st_size * sizeof(char)); |
65 | fread(buffer, statbuf.st_size, sizeof(char), passwd); | 66 | fread(buffer, statbuf.st_size, sizeof(char), passwd); |
66 | fclose(passwd); | 67 | fclose(passwd); |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 9bb70a1f5..c693cf9b5 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <sys/swap.h> | 15 | #include <sys/swap.h> |
16 | 16 | ||
17 | 17 | ||
18 | static int swap_enable_disable(const char *device) | 18 | static int swap_enable_disable(char *device) |
19 | { | 19 | { |
20 | int status; | 20 | int status; |
21 | struct stat st; | 21 | struct stat st; |