summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-11-17 19:03:30 +0100
committerSimon Josefsson <simon@josefsson.org>2008-11-17 19:03:30 +0100
commit7a345f9026677dc52241d93e2d1180f9436b07ab (patch)
treecb996f282a5602efcd7b60e1073f488b92d59c1c /lib
parent563a142600a37252a295a1b7cbbca5b59c438950 (diff)
downloadlibtasn1-7a345f9026677dc52241d93e2d1180f9436b07ab.tar.gz
libtasn1-7a345f9026677dc52241d93e2d1180f9436b07ab.tar.bz2
libtasn1-7a345f9026677dc52241d93e2d1180f9436b07ab.zip
Fix more warnings.
Diffstat (limited to 'lib')
-rw-r--r--lib/ASN1.c4
-rw-r--r--lib/ASN1.y4
-rw-r--r--lib/element.c2
-rw-r--r--lib/errors.c2
-rw-r--r--lib/gstr.c3
-rw-r--r--lib/int.h11
6 files changed, 9 insertions, 17 deletions
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 <gstr.h>
#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 <int.h>
+#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 */