apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1083183 - in /apr/apr/trunk: file_io/win32/filestat.c misc/unix/errorcodes.c test/testlfsabi.c test/testlfsabi.h user/win32/groupinfo.c user/win32/userinfo.c
Date Sat, 19 Mar 2011 14:38:24 GMT
Author: trawick
Date: Sat Mar 19 14:38:23 2011
New Revision: 1083183

URL: http://svn.apache.org/viewvc?rev=1083183&view=rev
Log:
fix low-hanging gcc warnings, mostly for Windows

Modified:
    apr/apr/trunk/file_io/win32/filestat.c
    apr/apr/trunk/misc/unix/errorcodes.c
    apr/apr/trunk/test/testlfsabi.c
    apr/apr/trunk/test/testlfsabi.h
    apr/apr/trunk/user/win32/groupinfo.c
    apr/apr/trunk/user/win32/userinfo.c

Modified: apr/apr/trunk/file_io/win32/filestat.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/filestat.c?rev=1083183&r1=1083182&r2=1083183&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/filestat.c (original)
+++ apr/apr/trunk/file_io/win32/filestat.c Sat Mar 19 14:38:23 2011
@@ -97,7 +97,7 @@ static void resolve_prot(apr_finfo_t *fi
      * there is no reason for os_level testing here.
      */
     if ((wanted & APR_FINFO_WPROT) && !worldid) {
-        SID_IDENTIFIER_AUTHORITY SIDAuth = SECURITY_WORLD_SID_AUTHORITY;
+        SID_IDENTIFIER_AUTHORITY SIDAuth = {SECURITY_WORLD_SID_AUTHORITY};
         if (AllocateAndInitializeSid(&SIDAuth, 1, SECURITY_WORLD_RID,
                                      0, 0, 0, 0, 0, 0, 0, &worldid))
             atexit(free_world);

Modified: apr/apr/trunk/misc/unix/errorcodes.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/unix/errorcodes.c?rev=1083183&r1=1083182&r2=1083183&view=diff
==============================================================================
--- apr/apr/trunk/misc/unix/errorcodes.c (original)
+++ apr/apr/trunk/misc/unix/errorcodes.c Sat Mar 19 14:38:23 2011
@@ -189,56 +189,56 @@ static const struct {
     apr_status_t code;
     const char *msg;
 } gaErrorList[] = {
-    WSAEINTR,           "Interrupted system call",
-    WSAEBADF,           "Bad file number",
-    WSAEACCES,          "Permission denied",
-    WSAEFAULT,          "Bad address",
-    WSAEINVAL,          "Invalid argument",
-    WSAEMFILE,          "Too many open sockets",
-    WSAEWOULDBLOCK,     "Operation would block",
-    WSAEINPROGRESS,     "Operation now in progress",
-    WSAEALREADY,        "Operation already in progress",
-    WSAENOTSOCK,        "Socket operation on non-socket",
-    WSAEDESTADDRREQ,    "Destination address required",
-    WSAEMSGSIZE,        "Message too long",
-    WSAEPROTOTYPE,      "Protocol wrong type for socket",
-    WSAENOPROTOOPT,     "Bad protocol option",
-    WSAEPROTONOSUPPORT, "Protocol not supported",
-    WSAESOCKTNOSUPPORT, "Socket type not supported",
-    WSAEOPNOTSUPP,      "Operation not supported on socket",
-    WSAEPFNOSUPPORT,    "Protocol family not supported",
-    WSAEAFNOSUPPORT,    "Address family not supported",
-    WSAEADDRINUSE,      "Address already in use",
-    WSAEADDRNOTAVAIL,   "Can't assign requested address",
-    WSAENETDOWN,        "Network is down",
-    WSAENETUNREACH,     "Network is unreachable",
-    WSAENETRESET,       "Net connection reset",
-    WSAECONNABORTED,    "Software caused connection abort",
-    WSAECONNRESET,      "Connection reset by peer",
-    WSAENOBUFS,         "No buffer space available",
-    WSAEISCONN,         "Socket is already connected",
-    WSAENOTCONN,        "Socket is not connected",
-    WSAESHUTDOWN,       "Can't send after socket shutdown",
-    WSAETOOMANYREFS,    "Too many references, can't splice",
-    WSAETIMEDOUT,       "Connection timed out",
-    WSAECONNREFUSED,    "Connection refused",
-    WSAELOOP,           "Too many levels of symbolic links",
-    WSAENAMETOOLONG,    "File name too long",
-    WSAEHOSTDOWN,       "Host is down",
-    WSAEHOSTUNREACH,    "No route to host",
-    WSAENOTEMPTY,       "Directory not empty",
-    WSAEPROCLIM,        "Too many processes",
-    WSAEUSERS,          "Too many users",
-    WSAEDQUOT,          "Disc quota exceeded",
-    WSAESTALE,          "Stale NFS file handle",
-    WSAEREMOTE,         "Too many levels of remote in path",
-    WSASYSNOTREADY,     "Network system is unavailable",
-    WSAVERNOTSUPPORTED, "Winsock version out of range",
-    WSANOTINITIALISED,  "WSAStartup not yet called",
-    WSAEDISCON,         "Graceful shutdown in progress",
-    WSAHOST_NOT_FOUND,  "Host not found",
-    WSANO_DATA,         "No host data of that type was found",
-    0,                  NULL
+    {WSAEINTR,           "Interrupted system call"},
+    {WSAEBADF,           "Bad file number"},
+    {WSAEACCES,          "Permission denied"},
+    {WSAEFAULT,          "Bad address"},
+    {WSAEINVAL,          "Invalid argument"},
+    {WSAEMFILE,          "Too many open sockets"},
+    {WSAEWOULDBLOCK,     "Operation would block"},
+    {WSAEINPROGRESS,     "Operation now in progress"},
+    {WSAEALREADY,        "Operation already in progress"},
+    {WSAENOTSOCK,        "Socket operation on non-socket"},
+    {WSAEDESTADDRREQ,    "Destination address required"},
+    {WSAEMSGSIZE,        "Message too long"},
+    {WSAEPROTOTYPE,      "Protocol wrong type for socket"},
+    {WSAENOPROTOOPT,     "Bad protocol option"},
+    {WSAEPROTONOSUPPORT, "Protocol not supported"},
+    {WSAESOCKTNOSUPPORT, "Socket type not supported"},
+    {WSAEOPNOTSUPP,      "Operation not supported on socket"},
+    {WSAEPFNOSUPPORT,    "Protocol family not supported"},
+    {WSAEAFNOSUPPORT,    "Address family not supported"},
+    {WSAEADDRINUSE,      "Address already in use"},
+    {WSAEADDRNOTAVAIL,   "Can't assign requested address"},
+    {WSAENETDOWN,        "Network is down"},
+    {WSAENETUNREACH,     "Network is unreachable"},
+    {WSAENETRESET,       "Net connection reset"},
+    {WSAECONNABORTED,    "Software caused connection abort"},
+    {WSAECONNRESET,      "Connection reset by peer"},
+    {WSAENOBUFS,         "No buffer space available"},
+    {WSAEISCONN,         "Socket is already connected"},
+    {WSAENOTCONN,        "Socket is not connected"},
+    {WSAESHUTDOWN,       "Can't send after socket shutdown"},
+    {WSAETOOMANYREFS,    "Too many references, can't splice"},
+    {WSAETIMEDOUT,       "Connection timed out"},
+    {WSAECONNREFUSED,    "Connection refused"},
+    {WSAELOOP,           "Too many levels of symbolic links"},
+    {WSAENAMETOOLONG,    "File name too long"},
+    {WSAEHOSTDOWN,       "Host is down"},
+    {WSAEHOSTUNREACH,    "No route to host"},
+    {WSAENOTEMPTY,       "Directory not empty"},
+    {WSAEPROCLIM,        "Too many processes"},
+    {WSAEUSERS,          "Too many users"},
+    {WSAEDQUOT,          "Disc quota exceeded"},
+    {WSAESTALE,          "Stale NFS file handle"},
+    {WSAEREMOTE,         "Too many levels of remote in path"},
+    {WSASYSNOTREADY,     "Network system is unavailable"},
+    {WSAVERNOTSUPPORTED, "Winsock version out of range"},
+    {WSANOTINITIALISED,  "WSAStartup not yet called"},
+    {WSAEDISCON,         "Graceful shutdown in progress"},
+    {WSAHOST_NOT_FOUND,  "Host not found"},
+    {WSANO_DATA,         "No host data of that type was found"},
+    {0,                  NULL}
 };
 
 

Modified: apr/apr/trunk/test/testlfsabi.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testlfsabi.c?rev=1083183&r1=1083182&r2=1083183&view=diff
==============================================================================
--- apr/apr/trunk/test/testlfsabi.c (original)
+++ apr/apr/trunk/test/testlfsabi.c Sat Mar 19 14:38:23 2011
@@ -26,7 +26,7 @@
 extern void get_type_sizes32(int *res);
 extern void get_type_sizes64(int *res);
 
-void get_type_sizes(int *res)
+static void get_type_sizes(int *res)
 {
 #include "testlfsabi_include.c"
 }

Modified: apr/apr/trunk/test/testlfsabi.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testlfsabi.h?rev=1083183&r1=1083182&r2=1083183&view=diff
==============================================================================
--- apr/apr/trunk/test/testlfsabi.h (original)
+++ apr/apr/trunk/test/testlfsabi.h Sat Mar 19 14:38:23 2011
@@ -26,3 +26,7 @@
 #define GETSIZE(res, type)  res[(IDX_##type)] = sizeof(type)
 #define CHECKSIZE(tc, res1, res2, type)                         \
   ABTS_INT_EQUAL(tc, res1[(IDX_##type)], res2[(IDX_##type)]);
+
+extern void get_type_sizes32(int *res);
+extern void get_type_sizes64(int *res);
+

Modified: apr/apr/trunk/user/win32/groupinfo.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/user/win32/groupinfo.c?rev=1083183&r1=1083182&r2=1083183&view=diff
==============================================================================
--- apr/apr/trunk/user/win32/groupinfo.c (original)
+++ apr/apr/trunk/user/win32/groupinfo.c Sat Mar 19 14:38:23 2011
@@ -36,11 +36,11 @@ APR_DECLARE(apr_status_t) apr_gid_get(ap
     DWORD rv;
     char *pos;
 
-    if (pos = strchr(groupname, '/')) {
+    if ((pos = strchr(groupname, '/'))) {
         domain = apr_pstrndup(p, groupname, pos - groupname);
         groupname = pos + 1;
     }
-    else if (pos = strchr(groupname, '\\')) {
+    else if ((pos = strchr(groupname, '\\'))) {
         domain = apr_pstrndup(p, groupname, pos - groupname);
         groupname = pos + 1;
     }

Modified: apr/apr/trunk/user/win32/userinfo.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/user/win32/userinfo.c?rev=1083183&r1=1083182&r2=1083183&view=diff
==============================================================================
--- apr/apr/trunk/user/win32/userinfo.c (original)
+++ apr/apr/trunk/user/win32/userinfo.c Sat Mar 19 14:38:23 2011
@@ -30,7 +30,7 @@
  * depends on IsValidSid(), which internally we better test long
  * before we get here!
  */
-void get_sid_string(char *buf, apr_size_t blen, apr_uid_t id)
+static void get_sid_string(char *buf, apr_size_t blen, apr_uid_t id)
 {
     PSID_IDENTIFIER_AUTHORITY psia;
     DWORD nsa;



Mime
View raw message