asn1: fix up some compiler warnings in asn1.c
authorJeff Layton <jlayton@samba.org>
Sun, 15 Apr 2012 12:14:59 +0000 (08:14 -0400)
committerJeff Layton <jlayton@samba.org>
Sun, 15 Apr 2012 12:14:59 +0000 (08:14 -0400)
commit730af950428eab6fd131b560a3ee41f4d5fbf405
tree33083e1acdcfeb38239d747ff7957b716fd19483
parentea9407fc4ae72a5d4245cbb25f7429f46d664d23
asn1: fix up some compiler warnings in asn1.c

These have been around for quite some time.

gcc -DHAVE_CONFIG_H -I.    -Wall -Wextra -g -O2 -MT asn1.o -MD -MP -MF
.deps/asn1.Tpo -c -o asn1.o asn1.c
asn1.c: In function ‘asn1_write’:
asn1.c:45:19: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
asn1.c: In function ‘asn1_peek’:
asn1.c:411:22: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
asn1.c: In function ‘asn1_tag_remaining’:
asn1.c:541:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
asn1.c: In function ‘_ber_read_OID_String_impl’:
asn1.c:570:22: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]

Almost all of these are due to the fact that asn1_data->ofs is a
signed value, and ->length is unsigned.

This should clear the way to add -Werror to the cflags in the near
future.

Signed-off-by: Jeff Layton <jlayton@samba.org>
asn1.c