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 /win32 | |
parent | a08314a5ac85a613ef1c8b1d14badae7e7324409 (diff) | |
download | busybox-w32-70a4a723c507efc4e1bcfa4d4685da0821bff6dc.tar.gz busybox-w32-70a4a723c507efc4e1bcfa4d4685da0821bff6dc.tar.bz2 busybox-w32-70a4a723c507efc4e1bcfa4d4685da0821bff6dc.zip |
win32: silence some compiler warnings
Diffstat (limited to 'win32')
-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 |
4 files changed, 14 insertions, 11 deletions
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); |