Fix a couple of issues with building with strict C99. C99 doesn't, technically, allow empty statements. Thus if a #define'ed function ends in a semicolon, and the use of it also ends in a semicolon, then the compiler sees “;;” at the end. Since a choice has to be made, I prefer that the semicolon exist at the “callsite” of a #define'ed fuction. But I haven't gone and changed everything to follow that in this patch. Change-Id: I1343e52a5ac6255db49aa053048d0df3225bcf43 Reviewed-on: https://boringssl-review.googlesource.com/3890 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h index 5c5e990..4baf81c 100644 --- a/include/openssl/asn1.h +++ b/include/openssl/asn1.h
@@ -517,7 +517,7 @@ } /* X509_ALGOR */; DEFINE_STACK_OF(X509_ALGOR); -DECLARE_ASN1_FUNCTIONS(X509_ALGOR); +DECLARE_ASN1_FUNCTIONS(X509_ALGOR) typedef struct NETSCAPE_X509_st {
diff --git a/include/openssl/stack.h b/include/openssl/stack.h index 287ca72..350fa14 100644 --- a/include/openssl/stack.h +++ b/include/openssl/stack.h
@@ -114,7 +114,7 @@ #define DEFINE_STACK_OF(type) \ STACK_OF(type) {\ _STACK stack; \ -}; +} #define DECLARE_STACK_OF(type) STACK_OF(type);