OSSP CVS Repository

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

Check-in Number: 4716
Date: 2004-Sep-12 19:20:36 (local)
2004-Sep-12 17:20:36 (UTC)
User:rse
Branch:
Comment: Fixed a few size_t/int conflicts and uninitialized value warnings.
Tickets:
Inspections:
Files:
ossp-pkg/xds/ChangeLog      1.3 -> 1.4     3 inserted, 0 deleted
ossp-pkg/xds/devtool.conf      1.6 -> 1.7     1 inserted, 1 deleted
ossp-pkg/xds/xds_engine_xdr.c      1.13 -> 1.14     2 inserted, 2 deleted
ossp-pkg/xds/xds_engine_xml.c      1.11 -> 1.12     11 inserted, 5 deleted

ossp-pkg/xds/ChangeLog 1.3 -> 1.4

--- ChangeLog    2004/09/12 17:07:22     1.3
+++ ChangeLog    2004/09/12 17:20:36     1.4
@@ -13,6 +13,9 @@
 
   Changes between 0.9.0 and 0.9.1 (17-Feb-2003 to 12-Sep-2004)
 
+   o Fixed a few size_t/int conflicts and uninitialized value warnings.
+     [Ralf S. Engelschall <rse@engelschall.com>]
+
    o Upgraded build environment to GNU shtool 2.0.1,
      GNU libtool 1.5.8 and GNU autoconf 2.59
      [Ralf S. Engelschall <rse@engelschall.com>]


ossp-pkg/xds/devtool.conf 1.6 -> 1.7

--- devtool.conf 2004/09/12 17:07:22     1.6
+++ devtool.conf 2004/09/12 17:20:36     1.7
@@ -13,7 +13,7 @@
     @autoclean autoconf
 
 %configure
-    ./configure \
+    CC=gcc35 ./configure \
         --prefix=/tmp/xds \
         --disable-shared \
         --enable-maintainer \


ossp-pkg/xds/xds_engine_xdr.c 1.13 -> 1.14

--- xds_engine_xdr.c     2003/02/17 12:36:02     1.13
+++ xds_engine_xdr.c     2004/09/12 17:20:36     1.14
@@ -377,7 +377,7 @@
                      void *buffer, size_t buffer_size,
                      size_t *used_buffer_size, va_list *args)
 {
-    myfloat_t   value;
+    myfloat_t   value = { 0, 0, 0 };
     xds_uint8_t tmp;
 
     xds_init_encoding_engine(4);
@@ -536,7 +536,7 @@
                      void *buffer, size_t buffer_size,
                      size_t *used_buffer_size, va_list *args)
 {
-    mydouble_t   value;
+    mydouble_t   value = { 0, 0, 0 };
     xds_uint16_t tmp;
 
     xds_init_encoding_engine(8);


ossp-pkg/xds/xds_engine_xml.c 1.11 -> 1.12

--- xds_engine_xml.c     2003/02/17 12:36:02     1.11
+++ xds_engine_xml.c     2004/09/12 17:20:36     1.12
@@ -434,14 +434,17 @@
 int xml_decode_float(xds_t *xds, void *engine_context,
                       void *buffer, size_t buffer_size,
                       size_t *used_buffer_size, va_list *args)
-    {
+{
+    int size;
     xds_init_decoding_engine(7 + 8 + 1);
     if (sscanf(buffer, "<float>%f</float>%n",
-               va_arg(*args, float*), used_buffer_size) != 1)
+               va_arg(*args, float*), &size) != 1)
         return XDS_ERR_TYPE_MISMATCH;
-    else
+    else {
+        *used_buffer_size = size;
         return XDS_OK;
     }
+}
 
 /*
  * Encode/decode double-precision floating point values.
@@ -464,12 +467,15 @@
                       void *buffer, size_t buffer_size,
                       size_t *used_buffer_size, va_list *args)
 {
+    int size;
     xds_init_decoding_engine(8 + 9 + 1);
     if (sscanf(buffer, "<double>%lf</double>%n",
-               va_arg(*args, double*), used_buffer_size) != 1)
+               va_arg(*args, double*), &size) != 1)
         return XDS_ERR_TYPE_MISMATCH;
-    else
+    else {
+        *used_buffer_size = size;
         return XDS_OK;
+    }
 }
 
 /*

CVSTrac 2.0.1