OSDN Git Service

* environ.cc (environ_init): Avoid a compiler warning.
authorcgf <cgf>
Mon, 30 Sep 2002 02:51:20 +0000 (02:51 +0000)
committercgf <cgf>
Mon, 30 Sep 2002 02:51:20 +0000 (02:51 +0000)
* 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.

winsup/cygwin/ChangeLog
winsup/cygwin/environ.cc
winsup/cygwin/hires.h
winsup/cygwin/path.cc
winsup/cygwin/path.h
winsup/cygwin/regex/engine.c
winsup/cygwin/regex/regcomp.c
winsup/cygwin/regex/regexec.c
winsup/cygwin/thread.h
winsup/cygwin/winsup.h

index 077111f..50a15b1 100644 (file)
@@ -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
index d2385f3..5290493 100644 (file)
@@ -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;
     }
index 611b2df..31394a0 100644 (file)
@@ -43,5 +43,4 @@ class hires_ms : hires_base
   LONGLONG usecs (bool justdelta);
   ~hires_ms ();
 };
-  
 #endif /*__HIRES_H__*/
index 29e2167..22ac83a 100644 (file)
@@ -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 ||
index c8bb7ce..9d8291a 100644 (file)
@@ -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;}
index 919fe3f..0b88dcf 100644 (file)
@@ -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;
index 52f9037..580c703 100644 (file)
@@ -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;
 
index 5ab72e0..35b99c2 100644 (file)
@@ -134,7 +134,7 @@ int eflags;
                return(REG_BADPAT);
        eflags = GOODFLAGS(eflags);
 
-       if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
+       if ((unsigned) g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
                return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
        else
                return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));
index 77a461f..9490ee9 100644 (file)
@@ -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;
index 18aaf8a..1aebfd7 100644 (file)
@@ -31,7 +31,7 @@ details. */
 #define NEW_MACRO_VARARGS
 #endif
 
-#ifndef _WIN32_WINNT 
+#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x0500
 #endif