From 661f3b91335ed8c57abfe2713464694cb4da3d05 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Sun, 24 Mar 2013 10:54:53 +0100 Subject: [PATCH] Fix syntax-check warnings. --- cfg.mk | 2 ++ lib/ASN1.y | 3 +-- lib/coding.c | 4 ++-- lib/decoding.c | 2 +- lib/libtasn1.map | 1 - src/benchmark.c | 6 +++--- src/benchmark.h | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cfg.mk b/cfg.mk index 63c1830..c7d4400 100644 --- a/cfg.mk +++ b/cfg.mk @@ -39,6 +39,8 @@ exclude_file_name_regexp--sc_GPL_version = ^lib/libtasn1.h$$ exclude_file_name_regexp--sc_program_name = ^tests/|examples/ exclude_file_name_regexp--sc_prohibit_atoi_atof = ^src/asn1Coding.c|src/asn1Decoding.c$$ exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/crlf.cer|tests/TestIndef.p12$$ +exclude_file_name_regexp--sc_error_message_uppercase = ^tests/Test_tree.c$$ +exclude_file_name_regexp--sc_unmarked_diagnostics = ^tests/Test_tree.c$$ bootstrap-tools := autoconf,automake,libtool,bison gpg_key_ID = b565716f diff --git a/lib/ASN1.y b/lib/ASN1.y index e633758..4934215 100644 --- a/lib/ASN1.y +++ b/lib/ASN1.y @@ -871,8 +871,7 @@ _asn1_yyerror (const char *s) { snprintf (last_error_token, sizeof(last_error_token), "%s", last_token); - fprintf(stderr, - "%s:%u: Warning: %s is a built-in ASN.1 type.\n", + fprintf(stderr, "%s:%u: Warning: %s is a built-in ASN.1 type.\n", file_name, line_number, last_token); return; } diff --git a/lib/coding.c b/lib/coding.c index 6aeb0ec..8dd6ae0 100644 --- a/lib/coding.c +++ b/lib/coding.c @@ -192,13 +192,13 @@ asn1_octet_der (const unsigned char *str, int str_len, * @tl_len: the bytes of the @tl field * * Creates the DER encoding for various simple ASN.1 types like strings etc. - * It stores the tag and length in @tl, which should have space for at least + * It stores the tag and length in @tl, which should have space for at least * %ASN1_MAX_TL_SIZE bytes. Initially @tl_len should contain the size of @tl. * * The complete DER encoding should consist of the value in @tl appended * with the provided @str. * - * Returns: %ASN1_SUCCESS if successful or an error value. + * Returns: %ASN1_SUCCESS if successful or an error value. **/ int asn1_encode_simple_der (unsigned int etype, const unsigned char *str, diff --git a/lib/decoding.c b/lib/decoding.c index 4c4e232..eb83d89 100644 --- a/lib/decoding.c +++ b/lib/decoding.c @@ -2878,7 +2878,7 @@ asn1_expand_octet_string (asn1_node definitions, asn1_node * element, * Decodes a simple DER encoded type (e.g. a string, which is not constructed). * The output is a pointer inside the @der. * - * Returns: %ASN1_SUCCESS if successful or an error value. + * Returns: %ASN1_SUCCESS if successful or an error value. **/ int asn1_decode_simple_der (unsigned int etype, const unsigned char *der, diff --git a/lib/libtasn1.map b/lib/libtasn1.map index f8f7c0f..4ddfd42 100644 --- a/lib/libtasn1.map +++ b/lib/libtasn1.map @@ -57,4 +57,3 @@ LIBTASN1_0_3 local: *; }; - diff --git a/src/benchmark.c b/src/benchmark.c index 840e275..dcde7c0 100644 --- a/src/benchmark.c +++ b/src/benchmark.c @@ -28,7 +28,7 @@ int benchmark_must_finish = 0; -#if defined(_WIN32) +#if defined _WIN32 #include DWORD WINAPI alarm_handler (LPVOID lpParameter) @@ -90,7 +90,7 @@ start_benchmark (struct benchmark_st *st) gettime (&st->start); benchmark_must_finish = 0; -#if defined(_WIN32) +#if defined _WIN32 st->wtimer = CreateWaitableTimer (NULL, TRUE, NULL); if (st->wtimer == NULL) { @@ -126,7 +126,7 @@ stop_benchmark (struct benchmark_st *st, const char *metric) double dspeed, ddata; char imetric[16]; -#if defined(_WIN32) +#if defined _WIN32 if (st->wtimer != NULL) CloseHandle (st->wtimer); if (st->wthread != NULL) diff --git a/src/benchmark.h b/src/benchmark.h index 0e7b11d..4e952a5 100644 --- a/src/benchmark.h +++ b/src/benchmark.h @@ -20,7 +20,7 @@ #include #include #include -#if defined(_WIN32) +#if defined _WIN32 #include #endif #include "timespec.h" /* gnulib gettime */ @@ -32,7 +32,7 @@ struct benchmark_st struct timespec start; unsigned long size; sighandler_t old_handler; -#if defined(_WIN32) +#if defined _WIN32 HANDLE wtimer; HANDLE wthread; LARGE_INTEGER alarm_timeout; -- 2.7.4