Silence warnings.
authorSimon Josefsson <simon@josefsson.org>
Sun, 24 Mar 2013 09:27:46 +0000 (10:27 +0100)
committerSimon Josefsson <simon@josefsson.org>
Sun, 24 Mar 2013 09:27:46 +0000 (10:27 +0100)
.gitignore
configure.ac
lib/decoding.c

index 2b5f79c..649598b 100644 (file)
@@ -1,8 +1,7 @@
-tags
-*~
 *.gcda
 *.gcno
 *.gcov
+*~
 ChangeLog
 INSTALL
 Makefile
@@ -119,6 +118,8 @@ gl/time.h
 gl/timespec.lo
 gl/timespec.o
 gl/unistd.h
+gl/unistd.lo
+gl/unistd.o
 gl/version-etc-fsf.lo
 gl/version-etc-fsf.o
 gl/version-etc.lo
@@ -185,13 +186,12 @@ src/asn1Parser
 src/asn1Parser.o
 src/benchmark.o
 stamp-h1
+tags
 tests/.deps/
 tests/Makefile
 tests/Makefile.in
 tests/Test_encoding
 tests/Test_encoding.o
-tests/Test_strings.o
-tests/Test_strings
 tests/Test_errors
 tests/Test_errors.o
 tests/Test_indefinite
@@ -203,6 +203,8 @@ tests/Test_parser.o
 tests/Test_parser_ERROR.asn
 tests/Test_simple
 tests/Test_simple.o
+tests/Test_strings
+tests/Test_strings.o
 tests/Test_tree
 tests/Test_tree.o
 windows/libtasn1-*-win??.zip
index a49dccd..561aa07 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is part of LIBTASN1.
 #
@@ -89,6 +89,7 @@ if test "$gl_gcc_warnings" = yes; then
     gl_WARN_ADD([$w])
   done
 
+  gl_WARN_ADD([-Wno-type-limits])
   gl_WARN_ADD([-Wno-missing-field-initializers])
   gl_WARN_ADD([-Wno-unused-parameter])
   gl_WARN_ADD([-Wno-stack-protector])            # Some functions cannot be protected
index c522c5d..efda4dc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2002-2013 Free Software Foundation, Inc.
  *
  * This file is part of LIBTASN1.
  *
@@ -109,7 +109,7 @@ asn1_get_length_der (const unsigned char *der, int der_len, int *len)
     return -2;
   sum += *len;
   
-  if (sum > (unsigned)der_len)
+  if (sum > der_len)
     return -4;
 
   return ans;
@@ -282,7 +282,7 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len,
   int len_len, len, k;
   int leading;
   char temp[20];
-  unsigned long val, val1, prev_val;
+  unsigned long val, val1;
 
   *ret_len = 0;
   if (str && str_size > 0)
@@ -303,7 +303,6 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len,
   _asn1_str_cat (str, str_size, ".");
   _asn1_str_cat (str, str_size, _asn1_ltostr (val, temp));
 
-  prev_val = 0;
   val = 0;
   leading = 1;
   for (k = 1; k < len; k++)
@@ -326,7 +325,6 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len,
          _asn1_str_cat (str, str_size, ".");
          _asn1_str_cat (str, str_size, _asn1_ltostr (val, temp));
          val = 0;
-         prev_val = 0;
          leading = 1;
        }
     }