diff options
author | Christopher Faylor <me@cgf.cx> | 2002-09-30 06:51:22 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-09-30 06:51:22 +0400 |
commit | 9d1e72a175495da5e6fb65582909169fd4b8a4a3 (patch) | |
tree | e1dafddbbc31cce15fb5c0596941c8fda4f2e7e0 | |
parent | 79ed43004f82508fc5b75e5eaf2f890cd63ad1fc (diff) |
* environ.cc (environ_init): Avoid a compiler warning.
* path.cc (path_conv::check): Ditto.
* path.h (path_conv::operator int): Ditto.
* regex/engine.c: Ditto throughout.
* regex/regcomp.c: Ditto throughout.
* regex/regexec.c: Ditto throughout.
-rw-r--r-- | winsup/cygwin/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/cygwin/environ.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/hires.h | 1 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/path.h | 2 | ||||
-rw-r--r-- | winsup/cygwin/regex/engine.c | 2 | ||||
-rw-r--r-- | winsup/cygwin/regex/regcomp.c | 8 | ||||
-rw-r--r-- | winsup/cygwin/regex/regexec.c | 2 | ||||
-rw-r--r-- | winsup/cygwin/thread.h | 8 | ||||
-rw-r--r-- | winsup/cygwin/winsup.h | 2 |
10 files changed, 24 insertions, 16 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 077111f48..50a15b166 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,14 @@ 2002-09-29 Christopher Faylor <cgf@redhat.com> + * environ.cc (environ_init): Avoid a compiler warning. + * path.cc (path_conv::check): Ditto. + * path.h (path_conv::operator int): Ditto. + * regex/engine.c: Ditto throughout. + * regex/regcomp.c: Ditto throughout. + * regex/regexec.c: Ditto throughout. + +2002-09-29 Christopher Faylor <cgf@redhat.com> + * thread.cc: Use "%E" in *_printf throughout rather than calling GetLastError. GNUify comments. (__pthread_mutex_lock): Don't return error on EBUSY since that just diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index d2385f39b..529049338 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -665,8 +665,8 @@ environ_init (char **envp, int envc) { for (int i = 0; conv_envvars[i].name != NULL; i++) { - conv_start_chars[cyg_tolower (conv_envvars[i].name[0])] = 1; - conv_start_chars[cyg_toupper (conv_envvars[i].name[0])] = 1; + conv_start_chars[(int) cyg_tolower (conv_envvars[i].name[0])] = 1; + conv_start_chars[(int) cyg_toupper (conv_envvars[i].name[0])] = 1; } initted = 1; } diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h index 611b2df0d..31394a0df 100644 --- a/winsup/cygwin/hires.h +++ b/winsup/cygwin/hires.h @@ -43,5 +43,4 @@ class hires_ms : hires_base LONGLONG usecs (bool justdelta); ~hires_ms (); }; - #endif /*__HIRES_H__*/ diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 29e21674b..22ac83a63 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -805,7 +805,7 @@ out: mkrelpath (this->path); if (need_directory) { - char n = strlen (this->path); + size_t n = strlen (this->path); /* Do not add trailing \ to UNC device names like \\.\a: */ if (this->path[n - 1] != '\\' && (strncmp (this->path, "\\\\.\\", 4) != 0 || diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index c8bb7cead..9d8291a59 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -146,7 +146,7 @@ class path_conv operator char *() {return path;} operator const char *() {return path;} operator DWORD &() {return fileattr;} - operator int &() {return (int) fileattr; } + operator int () {return fileattr; } char operator [](int i) const {return path[i];} BOOL is_device () {return devn != FH_BAD && devn != FH_DISK;} DWORD get_devn () {return devn == FH_BAD ? (DWORD) FH_DISK : devn;} diff --git a/winsup/cygwin/regex/engine.c b/winsup/cygwin/regex/engine.c index 919fe3f64..0b88dcf1e 100644 --- a/winsup/cygwin/regex/engine.c +++ b/winsup/cygwin/regex/engine.c @@ -71,7 +71,7 @@ regmatch_t pmatch[]; int eflags; { register char *endp; - register int i; + register size_t i; struct match mv; register struct match *m = &mv; register char *dp; diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c index 52f9037de..580c70328 100644 --- a/winsup/cygwin/regex/regcomp.c +++ b/winsup/cygwin/regex/regcomp.c @@ -1055,7 +1055,7 @@ freeset(p, cs) register struct parse *p; register cset *cs; { - register int i; + register size_t i; register cset *top = &p->g->sets[p->g->ncsets]; register size_t css = (size_t)p->g->csetsize; @@ -1081,7 +1081,7 @@ register struct parse *p; register cset *cs; { register uch h = cs->hash; - register int i; + register size_t i; register cset *top = &p->g->sets[p->g->ncsets]; register cset *cs2; register size_t css = (size_t)p->g->csetsize; @@ -1114,7 +1114,7 @@ firstch(p, cs) register struct parse *p; register cset *cs; { - register int i; + register size_t i; register size_t css = (size_t)p->g->csetsize; for (i = 0; i < css; i++) @@ -1133,7 +1133,7 @@ nch(p, cs) register struct parse *p; register cset *cs; { - register int i; + register size_t i; register size_t css = (size_t)p->g->csetsize; register int n = 0; diff --git a/winsup/cygwin/regex/regexec.c b/winsup/cygwin/regex/regexec.c index 5ab72e00e..35b99c272 100644 --- a/winsup/cygwin/regex/regexec.c +++ b/winsup/cygwin/regex/regexec.c @@ -134,7 +134,7 @@ int eflags; return(REG_BADPAT); eflags = GOODFLAGS(eflags); - if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE)) + if ((unsigned) g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE)) return(smatcher(g, (char *)string, nmatch, pmatch, eflags)); else return(lmatcher(g, (char *)string, nmatch, pmatch, eflags)); diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index 77a461ffd..9490ee947 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -254,7 +254,7 @@ template <class ListNode> void List<ListNode>::forEach (void (*callback)(ListNode *)) { ListNode *aNode = head; - while (aNode) + while (aNode) { callback (aNode); aNode = aNode->next; @@ -293,7 +293,7 @@ public: static bool isGoodInitializerOrObject(pthread_mutex_t const *); static void initMutex (); static int init (pthread_mutex_t *, const pthread_mutexattr_t *); - + CRITICAL_SECTION criticalsection; HANDLE win32_obj_id; LONG condwaits; @@ -355,7 +355,7 @@ public: virtual void exit (void *value_ptr); virtual int cancel (); - + virtual void testcancel (); static void static_cancel_self (); @@ -459,7 +459,7 @@ public: static int wait (sem_t * sem); static int trywait (sem_t * sem); static int post (sem_t * sem); - + HANDLE win32_obj_id; class semaphore * next; int shared; diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 18aaf8a9e..1aebfd73e 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -31,7 +31,7 @@ details. */ #define NEW_MACRO_VARARGS #endif -#ifndef _WIN32_WINNT +#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 #endif |