aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorPaul Eggert2011-03-29 17:39:12 -0700
committerPaul Eggert2011-03-29 17:39:12 -0700
commit77861b9528e3fbb5f406267ff298a95009530b7f (patch)
treed7eb3886831322f956d997d7bd10d034dfca5839 /src/coding.c
parentd806ab682a8e914345db3f2eede292f85745c98c (diff)
parentde6dbc14a72347f3f2a3b4f0bf3c39d6f69a425e (diff)
downloademacs-77861b9528e3fbb5f406267ff298a95009530b7f.tar.gz
emacs-77861b9528e3fbb5f406267ff298a95009530b7f.zip
Fix more problems found by GCC 4.6.0's static checks.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/coding.c b/src/coding.c
index fd812148a26..9e28a1c9f9b 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -9299,7 +9299,7 @@ function to call for FILENAME, that function should examine the
9299contents of BUFFER instead of reading the file. 9299contents of BUFFER instead of reading the file.
9300 9300
9301usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) 9301usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
9302 (int nargs, Lisp_Object *args) 9302 (size_t nargs, Lisp_Object *args)
9303{ 9303{
9304 Lisp_Object operation, target_idx, target, val; 9304 Lisp_Object operation, target_idx, target, val;
9305 register Lisp_Object chain; 9305 register Lisp_Object chain;
@@ -9308,17 +9308,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
9308 error ("Too few arguments"); 9308 error ("Too few arguments");
9309 operation = args[0]; 9309 operation = args[0];
9310 if (!SYMBOLP (operation) 9310 if (!SYMBOLP (operation)
9311 || !INTEGERP (target_idx = Fget (operation, Qtarget_idx))) 9311 || !NATNUMP (target_idx = Fget (operation, Qtarget_idx)))
9312 error ("Invalid first argument"); 9312 error ("Invalid first argument");
9313 if (nargs < 1 + XINT (target_idx)) 9313 if (nargs < 1 + XFASTINT (target_idx))
9314 error ("Too few arguments for operation: %s", 9314 error ("Too few arguments for operation: %s",
9315 SDATA (SYMBOL_NAME (operation))); 9315 SDATA (SYMBOL_NAME (operation)));
9316 target = args[XINT (target_idx) + 1]; 9316 target = args[XFASTINT (target_idx) + 1];
9317 if (!(STRINGP (target) 9317 if (!(STRINGP (target)
9318 || (EQ (operation, Qinsert_file_contents) && CONSP (target) 9318 || (EQ (operation, Qinsert_file_contents) && CONSP (target)
9319 && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) 9319 && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
9320 || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) 9320 || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
9321 error ("Invalid %dth argument", XINT (target_idx) + 1); 9321 error ("Invalid %dth argument", XFASTINT (target_idx) + 1);
9322 if (CONSP (target)) 9322 if (CONSP (target))
9323 target = XCAR (target); 9323 target = XCAR (target);
9324 9324
@@ -9375,9 +9375,9 @@ If multiple coding systems belong to the same category,
9375all but the first one are ignored. 9375all but the first one are ignored.
9376 9376
9377usage: (set-coding-system-priority &rest coding-systems) */) 9377usage: (set-coding-system-priority &rest coding-systems) */)
9378 (int nargs, Lisp_Object *args) 9378 (size_t nargs, Lisp_Object *args)
9379{ 9379{
9380 int i, j; 9380 size_t i, j;
9381 int changed[coding_category_max]; 9381 int changed[coding_category_max];
9382 enum coding_category priorities[coding_category_max]; 9382 enum coding_category priorities[coding_category_max];
9383 9383
@@ -9420,7 +9420,7 @@ usage: (set-coding-system-priority &rest coding-systems) */)
9420 9420
9421 /* Update `coding-category-list'. */ 9421 /* Update `coding-category-list'. */
9422 Vcoding_category_list = Qnil; 9422 Vcoding_category_list = Qnil;
9423 for (i = coding_category_max - 1; i >= 0; i--) 9423 for (i = coding_category_max; i-- > 0; )
9424 Vcoding_category_list 9424 Vcoding_category_list
9425 = Fcons (AREF (Vcoding_category_table, priorities[i]), 9425 = Fcons (AREF (Vcoding_category_table, priorities[i]),
9426 Vcoding_category_list); 9426 Vcoding_category_list);
@@ -9481,7 +9481,7 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal,
9481 Sdefine_coding_system_internal, coding_arg_max, MANY, 0, 9481 Sdefine_coding_system_internal, coding_arg_max, MANY, 0,
9482 doc: /* For internal use only. 9482 doc: /* For internal use only.
9483usage: (define-coding-system-internal ...) */) 9483usage: (define-coding-system-internal ...) */)
9484 (int nargs, Lisp_Object *args) 9484 (size_t nargs, Lisp_Object *args)
9485{ 9485{
9486 Lisp_Object name; 9486 Lisp_Object name;
9487 Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ 9487 Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */