OSSP CVS Repository

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

Check-in Number: 5197
Date: 2005-Oct-02 18:58:31 (local)
2005-Oct-02 16:58:31 (UTC)
User:rse
Branch:
Comment: Fix some sprintf(3) parameter passing.
Tickets:
Inspections:
Files:
ossp-pkg/var/ChangeLog      1.16 -> 1.17     3 inserted, 0 deleted
ossp-pkg/var/var_play.c      1.8 -> 1.9     1 inserted, 1 deleted
ossp-pkg/var/var_test.c      1.52 -> 1.53     2 inserted, 2 deleted

ossp-pkg/var/ChangeLog 1.16 -> 1.17

--- ChangeLog    2005/10/02 16:52:47     1.16
+++ ChangeLog    2005/10/02 16:58:31     1.17
@@ -12,6 +12,9 @@
   For less details please have a look at the NEWS file.
 
   Changes between 1.1.2 and 1.1.3 (31-Oct-2004 to 02-Oct-2005)
+
+   o Fix some sprintf(3) parameter passing.
+     [Ralf S. Engelschall <rse@engelschall.com>]
    
    o Upgraded build environment to GNU libtool 1.5.20
      and GNU shtool 2.0.3.


ossp-pkg/var/var_play.c 1.8 -> 1.9

--- var_play.c   2005/01/20 20:29:06     1.8
+++ var_play.c   2005/10/02 16:58:31     1.9
@@ -99,7 +99,7 @@
     if ((rc = var_expand(var, src_ptr, src_len, &dst_ptr, &dst_len, 1)) != VAR_OK) {
         if (rc != VAR_ERR_INVALID_ARGUMENT && rc != VAR_ERR_OUT_OF_MEMORY) {
             fprintf(stdout, "parsing:   \"%s\"\n", dst_ptr);
-            fprintf(stdout, "             %*s\n", dst_len, "^");
+            fprintf(stdout, "             %*s\n", (int)dst_len, "^");
         }
         die("variable expansion", var, rc);
     }


ossp-pkg/var/var_test.c 1.52 -> 1.53

--- var_test.c   2005/01/20 20:29:06     1.52
+++ var_test.c   2005/10/02 16:58:31     1.53
@@ -102,9 +102,9 @@
                        && strncmp(varname, vars[i + counter].name, name_len) == 0)
                     counter++;
                 if (counter == 1)
-                    sprintf(buf, "%d", length);
+                    sprintf(buf, "%d", (int)length);
                 else
-                    sprintf(buf, "%d", counter);
+                    sprintf(buf, "%d", (int)counter);
                 *data = buf;
                 *data_len = strlen(buf);
                 *buffer_size = 0;

CVSTrac 2.0.1