diff options
author | Ron Yorston <rmy@pobox.com> | 2015-07-15 11:45:53 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-07-15 11:53:50 +0100 |
commit | 70a4a723c507efc4e1bcfa4d4685da0821bff6dc (patch) | |
tree | a0ec583f0be1ed6f3fa46906d7b8d7ba2c8cadb2 | |
parent | a08314a5ac85a613ef1c8b1d14badae7e7324409 (diff) | |
download | busybox-w32-70a4a723c507efc4e1bcfa4d4685da0821bff6dc.tar.gz busybox-w32-70a4a723c507efc4e1bcfa4d4685da0821bff6dc.tar.bz2 busybox-w32-70a4a723c507efc4e1bcfa4d4685da0821bff6dc.zip |
win32: silence some compiler warnings
-rw-r--r-- | include/mingw.h | 5 | ||||
-rw-r--r-- | libbb/lineedit.c | 6 | ||||
-rw-r--r-- | win32/mingw.c | 3 | ||||
-rw-r--r-- | win32/mntent.c | 14 | ||||
-rw-r--r-- | win32/process.c | 2 | ||||
-rw-r--r-- | win32/uname.c | 6 |
6 files changed, 22 insertions, 14 deletions
diff --git a/include/mingw.h b/include/mingw.h index fa760342b..858e011de 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -215,6 +215,11 @@ void unsetenv(const char *env); | |||
215 | void *mempcpy(void *dest, const void *src, size_t n); | 215 | void *mempcpy(void *dest, const void *src, size_t n); |
216 | 216 | ||
217 | /* | 217 | /* |
218 | * strings.h | ||
219 | */ | ||
220 | int ffs(int i); | ||
221 | |||
222 | /* | ||
218 | * sys/ioctl.h | 223 | * sys/ioctl.h |
219 | */ | 224 | */ |
220 | 225 | ||
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 86ded6bc5..5cb40a508 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -760,7 +760,7 @@ static int path_parse(char ***p) | |||
760 | npth = 1; /* path component count */ | 760 | npth = 1; /* path component count */ |
761 | while (1) { | 761 | while (1) { |
762 | #if ENABLE_PLATFORM_MINGW32 | 762 | #if ENABLE_PLATFORM_MINGW32 |
763 | tmp = next_path_sep(tmp); | 763 | tmp = (char *)next_path_sep(tmp); |
764 | #else | 764 | #else |
765 | tmp = strchr(tmp, ':'); | 765 | tmp = strchr(tmp, ':'); |
766 | #endif | 766 | #endif |
@@ -777,7 +777,7 @@ static int path_parse(char ***p) | |||
777 | npth = 1; | 777 | npth = 1; |
778 | while (1) { | 778 | while (1) { |
779 | #if ENABLE_PLATFORM_MINGW32 | 779 | #if ENABLE_PLATFORM_MINGW32 |
780 | tmp = next_path_sep(tmp); | 780 | tmp = (char *)next_path_sep(tmp); |
781 | #else | 781 | #else |
782 | tmp = strchr(tmp, ':'); | 782 | tmp = strchr(tmp, ':'); |
783 | #endif | 783 | #endif |
@@ -2329,7 +2329,7 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman | |||
2329 | INIT_S(); | 2329 | INIT_S(); |
2330 | 2330 | ||
2331 | #if ENABLE_PLATFORM_MINGW32 | 2331 | #if ENABLE_PLATFORM_MINGW32 |
2332 | memset(initial_settings.c_cc, sizeof(initial_settings.c_cc), 0); | 2332 | memset(initial_settings.c_cc, 0, sizeof(initial_settings.c_cc)); |
2333 | initial_settings.c_cc[VINTR] = CTRL('C'); | 2333 | initial_settings.c_cc[VINTR] = CTRL('C'); |
2334 | initial_settings.c_cc[VEOF] = CTRL('D'); | 2334 | initial_settings.c_cc[VEOF] = CTRL('D'); |
2335 | if (!isatty(0) || !isatty(1)) { | 2335 | if (!isatty(0) || !isatty(1)) { |
diff --git a/win32/mingw.c b/win32/mingw.c index 824413586..6b63e2487 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -648,7 +648,8 @@ struct group *getgrgid(gid_t gid UNUSED_PARAM) | |||
648 | return &g; | 648 | return &g; |
649 | } | 649 | } |
650 | 650 | ||
651 | int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups) | 651 | int getgrouplist(const char *user UNUSED_PARAM, gid_t group UNUSED_PARAM, |
652 | gid_t *groups, int *ngroups) | ||
652 | { | 653 | { |
653 | if ( *ngroups == 0 ) { | 654 | if ( *ngroups == 0 ) { |
654 | *ngroups = 1; | 655 | *ngroups = 1; |
diff --git a/win32/mntent.c b/win32/mntent.c index d39ceb4a6..9b04a9c5e 100644 --- a/win32/mntent.c +++ b/win32/mntent.c | |||
@@ -28,10 +28,11 @@ struct mntent *getmntent(FILE *stream) | |||
28 | struct mntdata *data = (struct mntdata *)stream; | 28 | struct mntdata *data = (struct mntdata *)stream; |
29 | static char mnt_fsname[4]; | 29 | static char mnt_fsname[4]; |
30 | static char mnt_dir[4]; | 30 | static char mnt_dir[4]; |
31 | static char mnt_type[100]; | ||
32 | static char mnt_opts[4]; | ||
31 | static struct mntent my_mount_entry = | 33 | static struct mntent my_mount_entry = |
32 | { mnt_fsname, mnt_dir, (char *)"", (char *)"", 0, 0 }; | 34 | { mnt_fsname, mnt_dir, mnt_type, mnt_opts, 0, 0 }; |
33 | struct mntent *entry; | 35 | struct mntent *entry; |
34 | static char fsname[100]; | ||
35 | 36 | ||
36 | entry = NULL; | 37 | entry = NULL; |
37 | while ( ++data->index < 26 ) { | 38 | while ( ++data->index < 26 ) { |
@@ -43,12 +44,13 @@ struct mntent *getmntent(FILE *stream) | |||
43 | mnt_dir[1] = ':'; | 44 | mnt_dir[1] = ':'; |
44 | mnt_dir[2] = '\\'; | 45 | mnt_dir[2] = '\\'; |
45 | mnt_dir[3] = '\0'; | 46 | mnt_dir[3] = '\0'; |
47 | mnt_type[0] = '\0'; | ||
48 | mnt_opts[0] = '\0'; | ||
46 | 49 | ||
47 | if ( GetDriveType(mnt_dir) == DRIVE_FIXED ) { | 50 | if ( GetDriveType(mnt_dir) == DRIVE_FIXED ) { |
48 | my_mount_entry.mnt_type = ""; | 51 | if ( !GetVolumeInformation(mnt_dir, NULL, 0, NULL, NULL, |
49 | if ( GetVolumeInformation(mnt_dir, NULL, 0, NULL, NULL, | 52 | NULL, mnt_type, 100) ) { |
50 | NULL, fsname, 100) ) { | 53 | mnt_type[0] = '\0'; |
51 | my_mount_entry.mnt_type = fsname; | ||
52 | } | 54 | } |
53 | 55 | ||
54 | entry = &my_mount_entry; | 56 | entry = &my_mount_entry; |
diff --git a/win32/process.c b/win32/process.c index e38792b5a..2206a0a5e 100644 --- a/win32/process.c +++ b/win32/process.c | |||
@@ -10,7 +10,7 @@ int waitpid(pid_t pid, int *status, int options) | |||
10 | if (pid > 0 && options == 0) { | 10 | if (pid > 0 && options == 0) { |
11 | if ( (proc=OpenProcess(SYNCHRONIZE|PROCESS_QUERY_INFORMATION, | 11 | if ( (proc=OpenProcess(SYNCHRONIZE|PROCESS_QUERY_INFORMATION, |
12 | FALSE, pid)) != NULL ) { | 12 | FALSE, pid)) != NULL ) { |
13 | ret = _cwait(status, proc, 0); | 13 | ret = _cwait(status, (intptr_t)proc, 0); |
14 | CloseHandle(proc); | 14 | CloseHandle(proc); |
15 | return ret; | 15 | return ret; |
16 | } | 16 | } |
diff --git a/win32/uname.c b/win32/uname.c index 465ba1e28..3b3e21f8d 100644 --- a/win32/uname.c +++ b/win32/uname.c | |||
@@ -20,9 +20,9 @@ int uname(struct utsname *name) | |||
20 | strcpy(name->release, unk); | 20 | strcpy(name->release, unk); |
21 | strcpy(name->version, unk); | 21 | strcpy(name->version, unk); |
22 | if (GetVersionEx(&os_info)) { | 22 | if (GetVersionEx(&os_info)) { |
23 | sprintf(name->release, "%d.%d", os_info.dwMajorVersion, | 23 | sprintf(name->release, "%u.%u", (unsigned int)os_info.dwMajorVersion, |
24 | os_info.dwMinorVersion); | 24 | (unsigned int)os_info.dwMinorVersion); |
25 | sprintf(name->version, "%d", os_info.dwBuildNumber); | 25 | sprintf(name->version, "%u", (unsigned int)os_info.dwBuildNumber); |
26 | } | 26 | } |
27 | 27 | ||
28 | strcpy(name->machine, unk); | 28 | strcpy(name->machine, unk); |