diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index dbf5b5035..9ad6ffdbc 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,12 @@ +2011-02-29 Corinna Vinschen + + * cygcheck.cc (handle_unique_object_name): Avoid a compiler warning. + (dump_sysinfo): Ditto. + * loadlib.h (_load_sys_library): Mark as used, to avoid a compiler + warning. + * path.cc (oopt): Gurad with !FSTAB_ONLY to avoid a compiler warning. + (read_flags): Ditto. + 2011-02-28 Corinna Vinschen * setfacl.c (strchrnul): Drop local implementation. diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 1d2aa203c..0c56bbd75 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -1304,7 +1304,7 @@ int handle_unique_object_name (int opt, char *path) { HANDLE fh, fm; - void *haystack; + void *haystack = NULL; if (!path || !*path) usage (stderr, 1); @@ -1758,7 +1758,7 @@ dump_sysinfo () continue; char drive[4], name[200], fsname[200]; DWORD serno = 0, maxnamelen = 0, flags = 0; - name[0] = name[0] = fsname[0] = 0; + name[0] = fsname[0] = 0; sprintf (drive, "%c:\\", i + 'a'); /* Report all errors, except if the Volume is ERROR_NOT_READY. ERROR_NOT_READY is returned when removeable media drives are empty diff --git a/winsup/utils/loadlib.h b/winsup/utils/loadlib.h index 405b4b28d..7f3a9cc2b 100644 --- a/winsup/utils/loadlib.h +++ b/winsup/utils/loadlib.h @@ -1,6 +1,6 @@ /* loadlib.h - Copyright 2010 Red Hat, Inc. + Copyright 2010, 2011 Red Hat, Inc. This file is part of Cygwin. @@ -18,6 +18,8 @@ full path. This doesn't work for loadling cygwin1.dll. For this case, instead of prepending the path, make sure that the CWD is removed from the DLL search path, if possible (XP SP1++, Vista++). */ +static HMODULE _load_sys_library (const wchar_t *dll) __attribute__ ((used)); + static HMODULE _load_sys_library (const wchar_t *dll) { diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc index 8178eb45a..eaebb6cd1 100644 --- a/winsup/utils/path.cc +++ b/winsup/utils/path.cc @@ -1,6 +1,7 @@ /* path.cc - Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. + Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, + 2011 Red Hat, Inc. This file is part of Cygwin. @@ -299,6 +300,7 @@ conv_fstab_spaces (char *field) return field; } +#ifndef FSTAB_ONLY static struct opt { const char *name; @@ -353,6 +355,7 @@ read_flags (char *options, unsigned &flags) } return true; } +#endif bool from_fstab_line (mnt_t *m, char *line, bool user) @@ -579,7 +582,6 @@ read_mounts () DWORD len; WCHAR path[32768]; PWCHAR path_end; - HMODULE h; for (mnt_t *m1 = mount_table; m1->posix; m1++) {