CVS update: /ccvs/src/

[email protected] 17 Mar 2005 22:41:08 -0000
Newsgroups gmane.comp.version-control.cvs.cvs
Message-ID <[email protected]>
User: mdb     
Date: 05/03/17 14:41:08

Modified:
 /ccvs/src/
  ChangeLog, admin.c, commit.c, edit.c, fileattr.c, logmsg.c, server.c, subr.c,
  tag.c

Log:
 * admin.c (postadmin_proc): Cast NULL when it is an argument to
 stdarg function to ensure it is the correct type.
 * commit.c (precommit_proc): Ditto.
 * edit.c (notify_proc): Ditto.
 * fileattr.c (postwatch_proc): Ditto.
 * logmsg.c (logfile_write, verifymsg_proc): Ditto.
 * server.c (prepost_proxy_proc): Ditto.
 * subr.c (cmdlineescape): Ditto.
 * tag.c (posttag_proc): Ditto.

File Changes:

Directory: /ccvs/src/
=====================

File [changed]: ChangeLog
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/ChangeLog?r1=1.3162&r2=1.3163
Delta lines:  +14 -1
--------------------
--- ChangeLog	17 Mar 2005 22:36:24 -0000	1.3162
+++ ChangeLog	17 Mar 2005 22:41:06 -0000	1.3163
@@ -1,3 +1,16 @@
+2005-03-17  Mark D. Baushke  <[email protected]>
+
+	* admin.c (postadmin_proc): Cast NULL when it is an argument to
+	stdarg function to ensure it is the correct type.
+	* commit.c (precommit_proc): Ditto.
+	* edit.c (notify_proc): Ditto.
+	* fileattr.c (postwatch_proc): Ditto.
+	* logmsg.c (logfile_write, verifymsg_proc): Ditto.
+	* server.c (prepost_proxy_proc): Ditto.
+	* subr.c (cmdlineescape): Ditto.
+	* tag.c (posttag_proc): Ditto.
+	(Thanks to a report from Derek Price <[email protected]>.)
+	
 2005-03-17  Derek Price  <[email protected]>
 
 	* rcs.h (RCSNode): Improve comment.
@@ -26,7 +39,7 @@
 	* log.c (log_expand_revlist): Suppress message and not error handling
 	when really_quiet.
 
-2005-03-16  Mark D. Baushke  <[email protected]>
+2005-03-16  Mark D. Baushke  <[email protected]>
 
 	* buffer.c (fd_buffer_shutdown): Replace (int *) 0 with NULL.
 	* server.c (do_cvs_command): Ditto.

File [changed]: admin.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/admin.c?r1=1.106&r2=1.107
Delta lines:  +6 -2
-------------------
--- admin.c	17 Mar 2005 18:42:03 -0000	1.106
+++ admin.c	17 Mar 2005 22:41:06 -0000	1.107
@@ -151,6 +151,11 @@
      * %p = shortrepos
      * %r = repository
      */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
 	                      false, srepos,
@@ -162,8 +167,7 @@
 #endif /* SERVER_SUPPORT */
 	                      "p", "s", srepos,
 	                      "r", "s", current_parsed_root->directory,
-	                      NULL
-	                     );
+	                      (char *) NULL);
 
     if (!cmdline || !strlen (cmdline))
     {

File [changed]: commit.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/commit.c?r1=1.251&r2=1.252
Delta lines:  +14 -9
--------------------
--- commit.c	17 Mar 2005 18:42:03 -0000	1.251
+++ commit.c	17 Mar 2005 22:41:06 -0000	1.252
@@ -1257,6 +1257,11 @@
     }
 #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
 
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
         false, srepos,
@@ -1268,9 +1273,9 @@
 #endif /* SERVER_SUPPORT */
         "p", "s", srepos,
         "r", "s", current_parsed_root->directory,
-        "s", ",", ulist, precommit_list_to_args_proc, NULL,
-        NULL
-	);
+			      "s", ",", ulist, precommit_list_to_args_proc,
+			      (void *) NULL,
+			      (char *) NULL);
 
     if (newfilter) free (newfilter);
 

File [changed]: edit.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/edit.c?r1=1.83&r2=1.84
Delta lines:  +13 -9
--------------------
--- edit.c	16 Mar 2005 15:52:14 -0000	1.83
+++ edit.c	17 Mar 2005 22:41:06 -0000	1.84
@@ -813,6 +813,11 @@
     const char *srepos = Short_Repository (repository);
     struct notify_proc_args *args = closure;
 
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
 	false, srepos,
@@ -825,8 +830,7 @@
     	"p", "s", srepos,
 	"r", "s", current_parsed_root->directory,
 	"s", "s", args->notifyee,
-	NULL
-	);
+			      (char *) NULL);
     if (!cmdline || !strlen (cmdline))
     {
 	if (cmdline) free (cmdline);

File [changed]: fileattr.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/fileattr.c?r1=1.35&r2=1.36
Delta lines:  +6 -1
-------------------
--- fileattr.c	17 Mar 2005 17:15:19 -0000	1.35
+++ fileattr.c	17 Mar 2005 22:41:06 -0000	1.36
@@ -517,6 +517,11 @@
      * %p = shortrepos
      * %r = repository
      */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
 	                      false, srepos,
@@ -528,7 +533,7 @@
 #endif /* SERVER_SUPPORT */
 	                      "p", "s", srepos,
 	                      "r", "s", current_parsed_root->directory,
-	                      NULL);
+	                      (char *) NULL);
 
     if (!cmdline || !strlen (cmdline))
     {

File [changed]: logmsg.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/logmsg.c?r1=1.93&r2=1.94
Delta lines:  +13 -3
--------------------
--- logmsg.c	17 Mar 2005 17:15:19 -0000	1.93
+++ logmsg.c	17 Mar 2005 22:41:06 -0000	1.94
@@ -787,6 +787,11 @@
      * %r = repository
      * %{sVv} = file name, old revision (precommit), new revision (postcommit)
      */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
 	                      !config->UseNewInfoFmtStrings, srepos,
@@ -799,8 +804,8 @@
 	                      "p", "s", srepos,
 	                      "r", "s", current_parsed_root->directory,
 	                      "sVv", ",", changes,
-			      logmsg_list_to_args_proc, NULL,
-	                      NULL);
+			      logmsg_list_to_args_proc, (void *) NULL,
+	                      (char *) NULL);
     if (!cmdline || !strlen (cmdline))
     {
 	if (cmdline) free (cmdline);
@@ -907,6 +912,11 @@
 	}
     } /* if (vpd->fname == NULL) */
 
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     verifymsg_script = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
                                        false, srepos,
@@ -921,7 +931,7 @@
                                        "r", "s",
                                        current_parsed_root->directory,
                                        "l", "s", vpd->fname,
-                                       NULL);
+				       (char *) NULL);
 
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
     if (newscript) free (newscript);

File [changed]: server.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/server.c?r1=1.424&r2=1.425
Delta lines:  +6 -1
-------------------
--- server.c	17 Mar 2005 17:15:19 -0000	1.424
+++ server.c	17 Mar 2005 22:41:06 -0000	1.425
@@ -2232,6 +2232,11 @@
     TRACE (TRACE_FUNCTION, "prepost_proxy_proc (%s, %s, %s)", repository,
 	   filter, *pre ? "pre" : "post");
 
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 # ifdef SUPPORT_OLD_INFO_FMT_STRINGS
 	                      0, ".",
@@ -2242,7 +2247,7 @@
 	                      "p", "s", ".",
 	                      "r", "s", current_parsed_root->directory,
 	                      "P", "s", config->PrimaryServer->original,
-	                      NULL);
+	                      (char *) NULL);
 
     if (!cmdline || !strlen (cmdline))
     {

File [changed]: subr.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/subr.c?r1=1.139&r2=1.140
Delta lines:  +1 -1
-------------------
--- subr.c	17 Mar 2005 17:15:19 -0000	1.139
+++ subr.c	17 Mar 2005 22:41:06 -0000	1.140
@@ -1056,7 +1056,7 @@
  *                    "xG", "ld", longintwhichwontbeusedthispass,
  *                    "sVv", ",", tlist, pretag_list_to_args_proc,
  *                    (void *) mydata,
- *                    NULL);
+ *                    (char *) NULL);
  *
  *    would generate the following command line, assuming two files in tlist,
  *    file1 & file2, each with old versions 1.1 and new version 1.1.2.3:

File [changed]: tag.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/tag.c?r1=1.136&r2=1.137
Delta lines:  +14 -4
--------------------
--- tag.c	17 Mar 2005 17:15:19 -0000	1.136
+++ tag.c	17 Mar 2005 22:41:06 -0000	1.137
@@ -319,6 +319,11 @@
      *                           deleted from until
      *                           SUPPORT_OLD_INFO_FMT_STRINGS is undefined).
      */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
 			      false, srepos,
@@ -336,8 +341,8 @@
 			      "p", "s", srepos,
 			      "r", "s", current_parsed_root->directory,
 			      "sVv", ",", ppd->tlist,
-			      pretag_list_to_args_proc, NULL,
-			      NULL);
+			      pretag_list_to_args_proc, (void *) NULL,
+			      (char *) NULL);
 
     if (!cmdline || !strlen (cmdline))
     {
@@ -750,6 +755,11 @@
      *                           deleted from until
      *                           SUPPORT_OLD_INFO_FMT_STRINGS is undefined)
      */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
     cmdline = format_cmdline (
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
 			      false, srepos,
@@ -767,8 +777,8 @@
 			      "p", "s", srepos,
 			      "r", "s", current_parsed_root->directory,
 			      "sVv", ",", ppd->tlist,
-			      pretag_list_to_args_proc, NULL,
-			      NULL);
+			      pretag_list_to_args_proc, (void *) NULL,
+			      (char *) NULL);
 
     if (newfilter) free (newfilter);