]> sourceware.org Git - newlib-cygwin.git/commitdiff
* localtime.cc (increment_overflow): Mark as non-inline to prevent compiler
authorChristopher Faylor <me@cgf.cx>
Thu, 11 Sep 2008 05:43:11 +0000 (05:43 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 11 Sep 2008 05:43:11 +0000 (05:43 +0000)
from complaining about the very thing we're trying to test.
* ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error.
* sched.cc (sched_rr_get_interval): Ditto.
* select.cc (peek_serial): Ditto.
* libc/rexec.cc (ruserpass): Ditto.
* posix_ipc.cc (ipc_names): Make static to avoid a compiler warning
(and it's the right thing to do anyway).

winsup/cygwin/ChangeLog
winsup/cygwin/libc/rexec.cc
winsup/cygwin/localtime.cc
winsup/cygwin/ntea.cc
winsup/cygwin/posix_ipc.cc
winsup/cygwin/sched.cc
winsup/cygwin/sec_helper.cc
winsup/cygwin/select.cc

index 35bf5361fc82fe88dfb2b6dbd98691ac42e4fd50..fbd17fad3fa18521ee1a12f477cdf0c6853e8a12 100644 (file)
@@ -1,3 +1,14 @@
+2008-09-11  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * localtime.cc (increment_overflow): Mark as non-inline to prevent
+       compiler from complaining about the very thing we're trying to test.
+       * ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error.
+       * sched.cc (sched_rr_get_interval): Ditto.
+       * select.cc (peek_serial): Ditto.
+       * libc/rexec.cc (ruserpass): Ditto.
+       * posix_ipc.cc (ipc_names): Make static to avoid a compiler warning
+       (and it's the right thing to do anyway).
+
 2008-09-11  Christopher Faylor  <me+cygwin@cgf.cx>
 
        * net.cc (in6addr_any, in6addr_loopback): Add appropriate number of
index 99d76f68c1a37e73ac8d999793910e796d1896da..ca253f83efcf28d468160f33727c9befac4a4aaa 100644 (file)
@@ -206,7 +206,7 @@ next:
                while ((t = token()) && t != MACH && t != DEFAULT) switch(t) {
 
                case LOGIN:
-                       if (token())
+                       if (token()) {
                                if (*aname == 0) {
                                        *aname = (char *) malloc((unsigned) strlen(tokval) + 1);
                                        (void) strcpy(*aname, tokval);
@@ -214,6 +214,7 @@ next:
                                        if (strcmp(*aname, tokval))
                                                goto next;
                                }
+                       }
                        break;
                case PASSWD:
                        if ((*aname == 0 || strcmp(*aname, "anonymous")) &&
index d5f3622ec3a914c2d9eb9a8a6ade1878a6a9b25a..3d5b29c461c807e83903c2dfc5908bf94f776451 100644 (file)
@@ -1788,7 +1788,8 @@ ctime_r(const time_t *timep, char *buf)
 ** Simplified normalize logic courtesy Paul Eggert (eggert@twinsun.com).
 */
 
-static int
+/* Mark as noinline to prevent a compiler warning. */
+static int __attribute__((noinline))
 increment_overflow(int *number, int delta)
 {
        int     number0;
index e64dc4d993081e19535b79408cbe343c2b28a992..5b4ec3b5376d7714f86f3e425b680eb171842cea 100644 (file)
@@ -65,14 +65,15 @@ read_ea (HANDLE hdl, path_conv &pc, const char *name, char *value, size_t size)
       /* Samba hides the user namespace from Windows clients.  If we try to
         retrieve a user namespace item, we remove the leading namespace from
         the name, otherwise the search fails. */
-      if (pc.fs_is_samba ())
-       if (ascii_strncasematch (name, "user.", 5))
-         name += 5;
-       else
-         {
-           set_errno (ENOATTR);
-           goto out;
-         }
+      if (!pc.fs_is_samba ())
+       /* nothing to do */;
+      else if (ascii_strncasematch (name, "user.", 5))
+       name += 5;
+      else
+       {
+         set_errno (ENOATTR);
+         goto out;
+       }
 
       if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
        {
index 53b887493605727e6e607a4bd60f882b96c4c384..693b65498abcc2c705481f5f1b8c8e9505ddd325 100644 (file)
@@ -26,7 +26,7 @@ details. */
 
 /* The prefix_len is the length of the path prefix ncluding trailing "/"
    (or "/sem." for semaphores) as well as the trailing NUL. */
-struct
+static struct
 {
   const char *prefix;
   const size_t prefix_len;
index d894bf051aea6a0e5951419737c24d82a8b5962d..08f96833b0c0a55a01fbd2d2215896473b5d0006 100644 (file)
@@ -295,7 +295,7 @@ sched_rr_get_interval (pid_t pid, struct timespec *interval)
     qindex = 0;
   vfindex = ((prisep >> 2) & 3) % 3;
   if (vfindex == 0)
-    vfindex = wincap.is_server () || prisep & 3 == 0 ? 1 : 0;
+    vfindex = wincap.is_server () || (prisep & 3) == 0 ? 1 : 0;
   else
     vfindex -= 1;
   slindex = ((prisep >> 4) & 3) % 3;
index 6ce8e617cf9c835c130edc0e37935ba6ac43dbbf..753f8319dba6de08c50c2be09d65d4b795002237 100644 (file)
@@ -140,7 +140,7 @@ PSID
 cygsid::get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known)
 {
   DWORD i;
-  SID_IDENTIFIER_AUTHORITY sid_auth = {0,0,0,0,0,0};
+  SID_IDENTIFIER_AUTHORITY sid_auth = {{0,0,0,0,0,0}};
 
   if (s > 255 || cnt < 1 || cnt > 8)
     {
index 48c6eeb3aeb36554b63955c197fd52d25b0aeefc..eceeeafcbd561812f03ba6e8b866bb51aedd2831 100644 (file)
@@ -921,7 +921,7 @@ peek_serial (select_record *s, bool)
   set_handle_or_return_if_not_open (h, s);
   int ready = 0;
 
-  if (s->read_selected && s->read_ready || (s->write_selected && s->write_ready))
+  if ((s->read_selected && s->read_ready) || (s->write_selected && s->write_ready))
     {
       select_printf ("already ready");
       ready = 1;
This page took 0.043075 seconds and 5 git commands to generate.