diff options
author | Christopher Faylor <me@cgf.cx> | 2008-09-12 22:43:10 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2008-09-12 22:43:10 +0000 |
commit | a35d9f1a676f430e1dbbb555f327cd7a40df37f7 (patch) | |
tree | bb400cd789df6f8d154be4fca3e1aab9e59e3549 /winsup/utils/cygcheck.cc | |
parent | 175742d8c818ff31b06174494a77b30e5008eb83 (diff) | |
download | newlib-a35d9f1a676f430e1dbbb555f327cd7a40df37f7.zip newlib-a35d9f1a676f430e1dbbb555f327cd7a40df37f7.tar.gz newlib-a35d9f1a676f430e1dbbb555f327cd7a40df37f7.tar.bz2 |
* cygcheck.cc (pathlike::check_existence): Remove class name from declaration.
(display_internet_error): Use proper format specifier for DWORD.
(environ): Remove unneeded declaration.
(main): Use brace around nested if to avoid an overly-helpful compiler warning.
* dump_setup.cc (parse_filename): Reorganize nested if to avoid an
overly-helpful compiler warning.
* path.cc (GUID_shortcut): Use braces around part of initializer which needs
them.
(conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler
warning.
(struct opt): Make static.
* ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler
warning.
* regtool.cc: Make some anonymous structs static to avoid a compiler warning.
* ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential
uninitialized use.
* strace.cc (add_child): Use proper format specifier for DWORD.
(remove_child): Ditto.
(proc_child): Ditto.
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r-- | winsup/utils/cygcheck.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 0fc27fc..9a04cb4 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -124,9 +124,9 @@ struct pathlike { char *dir; bool issys; - void pathlike::check_existence (const char *fn, int showall, int verbose, - char* first, const char *ext1 = "", - const char *ext2 = ""); + void check_existence (const char *fn, int showall, int verbose, + char* first, const char *ext1 = "", + const char *ext2 = ""); }; pathlike *paths; @@ -201,7 +201,7 @@ display_internet_error (const char *message, ...) sizeof (err_buf), NULL) == 0) strcpy (err_buf, "(Unknown error)"); - fprintf (stderr, "cygcheck: %s: %s (win32 error %d)\n", message, + fprintf (stderr, "cygcheck: %s: %s (win32 error %lu)\n", message, err_buf, err); } else @@ -901,9 +901,6 @@ cygcheck (const char *app) return track_down (papp, ".exe", 0); } - -extern char **environ; - struct RegInfo { RegInfo *prev; @@ -2115,11 +2112,13 @@ main (int argc, char **argv) if (posixly == NULL) putenv ("POSIXLY_CORRECT="); - if (argc == 0 && !sysinfo && !keycheck && !check_setup && !list_package) - if (givehelp) - usage (stdout, 0); - else - usage (stderr, 1); + if ((argc == 0) && !sysinfo && !keycheck && !check_setup && !list_package) + { + if (givehelp) + usage (stdout, 0); + else + usage (stderr, 1); + } if ((check_setup || sysinfo || find_package || list_package || grep_packages) && keycheck) |