aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2011-03-26 19:12:36 -0700
committerPaul Eggert <[email protected]>2011-03-26 19:12:36 -0700
commitc5101a77a4066d979698d356c3a9c7f387007359 (patch)
tree0d18e8940a4fac6092a98a07bcc625bd29e67179 /src/callproc.c
parentdd3f25f792d724f59fac3e2d4faa21b311f21137 (diff)
Variadic C functions now count arguments with size_t, not int.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 75f239d1be..acb7a0e24b 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -177,7 +177,7 @@ and returns a numeric exit status or a signal description string.
If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
- (int nargs, register Lisp_Object *args)
+ (size_t nargs, register Lisp_Object *args)
{
Lisp_Object infile, buffer, current_dir, path;
volatile int display_p_volatile;
@@ -221,7 +221,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
/* Decide the coding-system for giving arguments. */
{
Lisp_Object val, *args2;
- int i;
+ size_t i;
/* If arguments are supplied, we may have to encode them. */
if (nargs >= 5)
@@ -373,10 +373,10 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
path = Fsubstring (path, make_number (2), Qnil);
new_argv_volatile = new_argv = (const unsigned char **)
- alloca (max (2, nargs - 2) * sizeof (char *));
+ alloca ((nargs > 4 ? nargs - 2 : 2) * sizeof (char *));
if (nargs > 4)
{
- register int i;
+ register size_t i;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
GCPRO5 (infile, buffer, current_dir, path, error_file);
@@ -643,7 +643,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
{
if (EQ (coding_systems, Qt))
{
- int i;
+ size_t i;
args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2);
args2[0] = Qcall_process;
@@ -864,7 +864,7 @@ and returns a numeric exit status or a signal description string.
If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &rest ARGS) */)
- (int nargs, register Lisp_Object *args)
+ (size_t nargs, register Lisp_Object *args)
{
struct gcpro gcpro1;
Lisp_Object filename_string;
@@ -873,7 +873,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
/* Qt denotes we have not yet called Ffind_operation_coding_system. */
Lisp_Object coding_systems;
Lisp_Object val, *args2;
- int i;
+ size_t i;
char *tempfile;
Lisp_Object tmpdir, pattern;