OSSP CVS Repository

ossp - Check-in [4495]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4495
Date: 2004-Apr-04 12:45:29 (local)
2004-Apr-04 10:45:29 (UTC)
User:rse
Branch:
Comment: Double-cast some variable passing to circumvent GCC warnings.
Tickets:
Inspections:
Files:
ossp-pkg/val/ChangeLog      1.2 -> 1.3     3 inserted, 0 deleted
ossp-pkg/val/val.c      1.17 -> 1.18     11 inserted, 11 deleted

ossp-pkg/val/ChangeLog 1.2 -> 1.3

--- ChangeLog    2004/04/04 10:40:50     1.2
+++ ChangeLog    2004/04/04 10:45:29     1.3
@@ -13,6 +13,9 @@
 
   Changes between 0.9.1 and 0.9.2 (17-Feb-2003 to 04-Apr-2004)
 
+   o Double-cast some variable passing to circumvent GCC warnings.
+     [Ralf S. Engelschall <rse@engelschall.com>]
+
    o Do not compare va_list variables against NULL because it
      is not defined whether va_list variables are really pointers.
      [Ralf S. Engelschall <rse@engelschall.com>]


ossp-pkg/val/val.c 1.17 -> 1.18

--- val.c        2004/04/04 10:40:50     1.17
+++ val.c        2004/04/04 10:45:29     1.18
@@ -714,7 +714,7 @@
 
     /* recursive step-down on structured name */
     if ((cp = strchr(name, '.')) != NULL) {
-        if (!lh_lookup(val->lh, name, cp-name, (void **)&obj, NULL))
+        if (!lh_lookup(val->lh, name, cp-name, (void **)(void *)&obj, NULL))
             return VAL_RC(VAL_ERR_ARG);
         if (!(obj->type & VAL_TYPE_VAL))
             return VAL_RC(VAL_ERR_USE);
@@ -755,7 +755,7 @@
 
     /* recursive step-down on structured name */
     if ((cp = strchr(name, '.')) != NULL) {
-        if (!lh_lookup(val->lh, name, cp-name, (void **)&obj, NULL))
+        if (!lh_lookup(val->lh, name, cp-name, (void **)(void *)&obj, NULL))
             return VAL_RC(VAL_ERR_ARG);
         if (!(obj->type & VAL_TYPE_VAL))
             return VAL_RC(VAL_ERR_USE);
@@ -764,7 +764,7 @@
     }
 
     /* try to lookup object in hash table */
-    if (!lh_lookup(val->lh, name, strlen(name), (void **)&obj, NULL))
+    if (!lh_lookup(val->lh, name, strlen(name), (void **)(void *)&obj, NULL))
         return VAL_RC(VAL_ERR_ARG);
 
     /* destroy value object */
@@ -792,7 +792,7 @@
 
     /* recursive step-down on structured name */
     if ((cp = strchr(name, '.')) != NULL) {
-        if (!lh_lookup(val->lh, name, cp-name, (void **)&obj, NULL))
+        if (!lh_lookup(val->lh, name, cp-name, (void **)(void *)&obj, NULL))
             return VAL_RC(VAL_ERR_ARG);
         if (!(obj->type & VAL_TYPE_VAL))
             return VAL_RC(VAL_ERR_USE);
@@ -801,7 +801,7 @@
     }
 
     /* try to lookup object in hash table */
-    if (!lh_lookup(val->lh, name, strlen(name), (void **)&obj, NULL))
+    if (!lh_lookup(val->lh, name, strlen(name), (void **)(void *)&obj, NULL))
         return VAL_RC(VAL_ERR_ARG);
 
     /* pass queried information to caller */
@@ -829,7 +829,7 @@
 
     /* recursive step-down on structured name */
     if ((cp = strchr(name, '.')) != NULL) {
-        if (!lh_lookup(val->lh, name, cp-name, (void **)&obj, NULL))
+        if (!lh_lookup(val->lh, name, cp-name, (void **)(void *)&obj, NULL))
             return VAL_RC(VAL_ERR_ARG);
         if (!(obj->type & VAL_TYPE_VAL))
             return VAL_RC(VAL_ERR_USE);
@@ -838,7 +838,7 @@
     }
 
     /* try to lookup object in hash table */
-    if (!lh_lookup(val->lh, name, strlen(name), (void **)&obj, NULL))
+    if (!lh_lookup(val->lh, name, strlen(name), (void **)(void *)&obj, NULL))
         return VAL_RC(VAL_ERR_ARG);
 
     /* determine value storage */
@@ -893,7 +893,7 @@
 
     /* recursive step-down on structured name */
     if ((cp = strchr(name, '.')) != NULL) {
-        if (!lh_lookup(val->lh, name, cp-name, (void **)&obj, NULL))
+        if (!lh_lookup(val->lh, name, cp-name, (void **)(void *)&obj, NULL))
             return VAL_RC(VAL_ERR_ARG);
         if (!(obj->type & VAL_TYPE_VAL))
             return VAL_RC(VAL_ERR_USE);
@@ -902,7 +902,7 @@
     }
 
     /* try to lookup object in hash table */
-    if (!lh_lookup(val->lh, name, strlen(name), (void **)&obj, NULL))
+    if (!lh_lookup(val->lh, name, strlen(name), (void **)(void *)&obj, NULL))
         return VAL_RC(VAL_ERR_ARG);
 
     /* determine value storage */
@@ -1014,7 +1014,7 @@
     else if ((cp = strchr(name+prefixlen, '.')) != NULL) {
         /* CASE 2: still stepping-down for structured name
            prefix="foo.bar.", remainder="quux.baz" */
-        if (!lh_lookup(val->lh, name+prefixlen, cp-(name+prefixlen), (void **)&obj, NULL))
+        if (!lh_lookup(val->lh, name+prefixlen, cp-(name+prefixlen), (void **)(void *)&obj, NULL))
             return VAL_RC(VAL_ERR_ARG);
         if (!(obj->type & VAL_TYPE_VAL))
             return VAL_RC(VAL_ERR_USE);
@@ -1025,7 +1025,7 @@
     } else {
         /* CASE 3: reached last component of structured name
            prefix="foo.bar.quux.", remainder="baz" */
-        if (!lh_lookup(val->lh, name+prefixlen, strlen(name+prefixlen), (void **)&obj, NULL))
+        if (!lh_lookup(val->lh, name+prefixlen, strlen(name+prefixlen), (void **)(void *)&obj, NULL))
             return VAL_RC(VAL_ERR_ARG);
         if ((rc = cb(ctx, name, (obj->type & ~VAL_INLINE),
                      obj->desc, val_storage(obj))) != VAL_OK)

CVSTrac 2.0.1