summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-03-29 17:39:12 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-03-29 17:39:12 -0700
commit77861b9528e3fbb5f406267ff298a95009530b7f (patch)
treed7eb3886831322f956d997d7bd10d034dfca5839 /src/coding.c
parentd806ab682a8e914345db3f2eede292f85745c98c (diff)
parentde6dbc14a72347f3f2a3b4f0bf3c39d6f69a425e (diff)
downloademacs-77861b9528e3fbb5f406267ff298a95009530b7f.tar.gz
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
contents of BUFFER instead of reading the file.
usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
- (int nargs, Lisp_Object *args)
+ (size_t nargs, Lisp_Object *args)
{
Lisp_Object operation, target_idx, target, val;
register Lisp_Object chain;
@@ -9308,17 +9308,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
error ("Too few arguments");
operation = args[0];
if (!SYMBOLP (operation)
- || !INTEGERP (target_idx = Fget (operation, Qtarget_idx)))
+ || !NATNUMP (target_idx = Fget (operation, Qtarget_idx)))
error ("Invalid first argument");
- if (nargs < 1 + XINT (target_idx))
+ if (nargs < 1 + XFASTINT (target_idx))
error ("Too few arguments for operation: %s",
SDATA (SYMBOL_NAME (operation)));
- target = args[XINT (target_idx) + 1];
+ target = args[XFASTINT (target_idx) + 1];
if (!(STRINGP (target)
|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
&& STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
- error ("Invalid %dth argument", XINT (target_idx) + 1);
+ error ("Invalid %dth argument", XFASTINT (target_idx) + 1);
if (CONSP (target))
target = XCAR (target);
@@ -9375,9 +9375,9 @@ If multiple coding systems belong to the same category,
all but the first one are ignored.
usage: (set-coding-system-priority &rest coding-systems) */)
- (int nargs, Lisp_Object *args)
+ (size_t nargs, Lisp_Object *args)
{
- int i, j;
+ size_t i, j;
int changed[coding_category_max];
enum coding_category priorities[coding_category_max];
@@ -9420,7 +9420,7 @@ usage: (set-coding-system-priority &rest coding-systems) */)
/* Update `coding-category-list'. */
Vcoding_category_list = Qnil;
- for (i = coding_category_max - 1; i >= 0; i--)
+ for (i = coding_category_max; i-- > 0; )
Vcoding_category_list
= Fcons (AREF (Vcoding_category_table, priorities[i]),
Vcoding_category_list);
@@ -9481,7 +9481,7 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal,
Sdefine_coding_system_internal, coding_arg_max, MANY, 0,
doc: /* For internal use only.
usage: (define-coding-system-internal ...) */)
- (int nargs, Lisp_Object *args)
+ (size_t nargs, Lisp_Object *args)
{
Lisp_Object name;
Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */