From 7a345f9026677dc52241d93e2d1180f9436b07ab Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 17 Nov 2008 19:03:30 +0100 Subject: Fix more warnings. --- lib/ASN1.c | 4 ++-- lib/ASN1.y | 4 ++-- lib/element.c | 2 ++ lib/errors.c | 2 +- lib/gstr.c | 3 ++- lib/int.h | 11 ----------- 6 files changed, 9 insertions(+), 17 deletions(-) (limited to 'lib') diff --git a/lib/ASN1.c b/lib/ASN1.c index 1cbb7b0..2ddedec 100644 --- a/lib/ASN1.c +++ b/lib/ASN1.c @@ -181,7 +181,7 @@ static char lastToken[ASN1_MAX_NAME_SIZE+1]; /* last token find in the file extern char _asn1_identifierMissing[]; static const char *fileName; /* file to parse */ -static int _asn1_yyerror (char *); +static int _asn1_yyerror (const char *); static int _asn1_yylex(void); @@ -2739,7 +2739,7 @@ int asn1_parser2array(const char *inputFileName,const char *outputFileName, /* Return: int */ /* */ /*************************************************************/ -static int _asn1_yyerror (char *s) +static int _asn1_yyerror (const char *s) { /* Sends the error description to the std_out */ diff --git a/lib/ASN1.y b/lib/ASN1.y index 1b30822..eaae9eb 100644 --- a/lib/ASN1.y +++ b/lib/ASN1.y @@ -51,7 +51,7 @@ static char lastToken[ASN1_MAX_NAME_SIZE+1]; /* last token find in the file extern char _asn1_identifierMissing[]; static const char *fileName; /* file to parse */ -static int _asn1_yyerror (char *); +static int _asn1_yyerror (const char *); static int _asn1_yylex(void); %} @@ -787,7 +787,7 @@ int asn1_parser2array(const char *inputFileName,const char *outputFileName, /* Return: int */ /* */ /*************************************************************/ -static int _asn1_yyerror (char *s) +static int _asn1_yyerror (const char *s) { /* Sends the error description to the std_out */ diff --git a/lib/element.c b/lib/element.c index 05da2f2..e82807f 100644 --- a/lib/element.c +++ b/lib/element.c @@ -33,6 +33,8 @@ #include #include "structure.h" +#include "element.h" + void _asn1_hierarchical_name (ASN1_TYPE node, char *name, int name_size) { diff --git a/lib/errors.c b/lib/errors.c index 29e08dc..9524fe1 100644 --- a/lib/errors.c +++ b/lib/errors.c @@ -54,7 +54,7 @@ static const libtasn1_error_entry error_algorithms[] = { LIBTASN1_ERROR_ENTRY (ASN1_NAME_TOO_LONG), LIBTASN1_ERROR_ENTRY (ASN1_ARRAY_ERROR), LIBTASN1_ERROR_ENTRY (ASN1_ELEMENT_NOT_EMPTY), - {0} + {0, 0} }; /** diff --git a/lib/gstr.c b/lib/gstr.c index a093643..bf8f90c 100644 --- a/lib/gstr.c +++ b/lib/gstr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Free Software Foundation + * Copyright (C) 2006, 2008 Free Software Foundation * Copyright (C) 2002 Nikos Mavroyanopoulos * * This file is part of LIBTASN1. @@ -21,6 +21,7 @@ */ #include +#include "gstr.h" /* These function are like strcat, strcpy. They only * do bounds checking (they shouldn't cause buffer overruns), diff --git a/lib/int.h b/lib/int.h index 01f8e7f..65cc10b 100644 --- a/lib/int.h +++ b/lib/int.h @@ -140,15 +140,4 @@ struct node_asn #define CONST_DOWN (1<<29) #define CONST_RIGHT (1<<30) -/* Prototypes for gstr.c. */ -void _asn1_str_cat (char *dest, size_t dest_tot_size, const char *src); -void _asn1_str_cpy (char *dest, size_t dest_tot_size, const char *src); - -/* Prototypes for element.c. */ -void _asn1_hierarchical_name (ASN1_TYPE node, char *name, int name_size); -asn1_retCode _asn1_convert_integer (const char *value, - unsigned char *value_out, - int value_out_size, int *len); -int _asn1_append_sequence_set (ASN1_TYPE node); - #endif /* INT_H */ -- cgit v1.2.3