From 3d9221565c51fe3006546fb14e0738cbb011e24c Mon Sep 17 00:00:00 2001 From: Fabio Fiorina Date: Wed, 10 Apr 2002 20:25:42 +0000 Subject: [PATCH] warning fix --- lib/asn1.c | 4 ++-- lib/der.c | 10 +++++----- src/CertificateExample.c | 8 ++++---- src/CrlExample.c | 8 ++++---- src/asn1c.c | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/asn1.c b/lib/asn1.c index 740cf62..224922c 100644 --- a/lib/asn1.c +++ b/lib/asn1.c @@ -461,7 +461,7 @@ _asn1_convert_integer(char *value,unsigned char *value_out,int value_out_size, i int asn1_create_tree(const static_asn *root,node_asn **pointer) { - node_asn *p,*p_last; + node_asn *p,*p_last=NULL; unsigned long k; int move; @@ -1093,7 +1093,7 @@ int asn1_write_value(node_asn *node_root,char *name,unsigned char *value,int len) { node_asn *node,*p,*p2; - unsigned char *temp,*value_temp,*default_temp; + unsigned char *temp,*value_temp=NULL,*default_temp=NULL; int len2,k,k2,negative; node=_asn1_find_node(node_root,name); diff --git a/lib/der.c b/lib/der.c index 4c1c8ed..2aebab3 100644 --- a/lib/der.c +++ b/lib/der.c @@ -267,7 +267,7 @@ _asn1_objectid_der(unsigned char *str,unsigned char *der,int *der_len) int len_len,counter,k,first; char temp[128],*n_end,*n_start; unsigned char bit7; - unsigned long val,val1; + unsigned long val,val1=0; if(der==NULL) return; @@ -427,8 +427,8 @@ _asn1_insert_tag_der(node_asn *node,unsigned char *der,int *counter) { node_asn *p; int tag_len,is_tag_implicit; - unsigned char class,class_implicit,temp[10]; - unsigned long tag_implicit; + unsigned char class,class_implicit=0,temp[10]; + unsigned long tag_implicit=0; is_tag_implicit=0; @@ -531,8 +531,8 @@ _asn1_extract_tag_der(node_asn *node,unsigned char *der,int *der_len) { node_asn *p; int counter,len2,len3,is_tag_implicit; - unsigned long tag,tag_implicit; - unsigned char class,class2,class_implicit; + unsigned long tag,tag_implicit=0; + unsigned char class,class2,class_implicit=0; counter=is_tag_implicit=0; if(node->type&CONST_TAG){ diff --git a/src/CertificateExample.c b/src/CertificateExample.c index 516db82..404b182 100644 --- a/src/CertificateExample.c +++ b/src/CertificateExample.c @@ -467,15 +467,15 @@ main(int argc,char *argv[]) if(result==ASN_FILE_NOT_FOUND){ printf("FILE NOT FOUND\n"); - return; + return 1; } else if(result==ASN_SYNTAX_ERROR){ printf("PARSE ERROR\n"); - return; + return 1; } else if(result==ASN_IDENTIFIER_NOT_FOUND){ printf("IDENTIFIER NOT FOUND\n"); - return; + return 1; } @@ -492,7 +492,7 @@ main(int argc,char *argv[]) /* Clear the "PKIX1Implicit88" structures */ asn1_delete_structure(PKIX1Implicit88); - return; + return 1; } diff --git a/src/CrlExample.c b/src/CrlExample.c index c2a4635..cbb6156 100644 --- a/src/CrlExample.c +++ b/src/CrlExample.c @@ -385,15 +385,15 @@ main(int argc,char *argv[]) if(result==ASN_FILE_NOT_FOUND){ printf("FILE NOT FOUND\n"); - return; + return 1; } else if(result==ASN_SYNTAX_ERROR){ printf("PARSE ERROR\n"); - return; + return 1; } else if(result==ASN_IDENTIFIER_NOT_FOUND){ printf("IDENTIFIER NOT FOUND\n"); - return; + return 1; } @@ -410,7 +410,7 @@ main(int argc,char *argv[]) /* Clear the "PKIX1Implicit88" structures */ asn1_delete_structure(PKIX1Implicit88); - return; + return 0; } diff --git a/src/asn1c.c b/src/asn1c.c index b398305..27e3d5e 100644 --- a/src/asn1c.c +++ b/src/asn1c.c @@ -48,18 +48,18 @@ main(int argc,char *argv[]) if(result==ASN_SYNTAX_ERROR){ printf("PARSE ERROR\n"); - return; + return 1; } else if(result==ASN_IDENTIFIER_NOT_FOUND){ printf("IDENTIFIER NOT FOUND\n"); - return; + return 1; } else if(result==ASN_FILE_NOT_FOUND){ printf("FILE NOT FOUND\n"); - return; + return 1; } - return; + return 0; } -- 2.7.4