commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r818773 - in /commons/sandbox/runtime/trunk/src/main/native: shared/ini.c shared/sbuf.c srclib/regex/regex2.h
Date Fri, 25 Sep 2009 08:52:33 GMT
Author: mturk
Date: Fri Sep 25 08:52:32 2009
New Revision: 818773

URL: http://svn.apache.org/viewvc?rev=818773&view=rev
Log:
Fix compile warnings

Modified:
    commons/sandbox/runtime/trunk/src/main/native/shared/ini.c
    commons/sandbox/runtime/trunk/src/main/native/shared/sbuf.c
    commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/ini.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/ini.c?rev=818773&r1=818772&r2=818773&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/ini.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/ini.c Fri Sep 25 08:52:32 2009
@@ -319,9 +319,9 @@
 
 static char *rtrim(char *s)
 {
-    size_t i;
+    int i;
     /* check for empty strings */
-    if (!(i = strlen(s)))
+    if (!(i = (int)strlen(s)))
         return s;
     for (i = i - 1; i >= 0 && acr_isspace(s[i]); i--)
         ;
@@ -331,7 +331,7 @@
 
 static char *ltrim(const char *s)
 {
-    size_t i;
+    int i;
     /* check for empty strings */
     if (!s)
         return (char *)s;
@@ -349,9 +349,9 @@
  */
 static char *strtrim(char *s)
 {
-    size_t i;
+    int i;
     /* check for empty strings */
-    if (!(i = strlen(s)))
+    if (!(i = (int)strlen(s)))
         return s;
     for (i = i - 1; i >= 0 && acr_isspace(s[i]); i--)
         ;
@@ -369,10 +369,10 @@
  */
 static char *strtrim_p(char *s)
 {
-    size_t i;
-    int    c = 0;
+    int i;
+    int c = 0;
     /* check for empty strings */
-    if (!s || !(i = strlen(s)))
+    if (!s || !(i = (int)strlen(s)))
         return s;
     for (i = i - 1; i >= 0 && acr_isspace(s[i]); i--)
         ;

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/sbuf.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/sbuf.c?rev=818773&r1=818772&r2=818773&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/sbuf.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/sbuf.c Fri Sep 25 08:52:32 2009
@@ -122,10 +122,6 @@
 acr_sbuf_new(acr_sbuf_t *s, char *buf, size_t length, int flags)
 {
 
-    if (length < 0) {
-        ACR_SET_OS_ERROR(ACR_EINVAL);
-        return NULL;
-    }
     if ((flags & ~ACR_SBUF_USRFLAGMSK)) {
         ACR_SET_OS_ERROR(ACR_EINVAL);
         return NULL;
@@ -180,10 +176,6 @@
 acr_sbuf_setpos(acr_sbuf_t *s, size_t pos)
 {
 
-    if (pos < 0) {
-        ACR_SET_OS_ERROR(ACR_EINVAL);
-        return -1;
-    }
     if (pos >= s->s_size) {
         ACR_SET_OS_ERROR(ACR_EINVAL);
         return -1;

Modified: commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h?rev=818773&r1=818772&r2=818773&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h Fri Sep 25 08:52:32
2009
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+/* AIX defines it's own BAD */
+#undef BAD
 /*
  * internals of regex_t
  */



Mime
View raw message