]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
asn1: Fix build with DEBUG_LEVEL < 2
authorTobias Brunner <tobias@strongswan.org>
Tue, 18 Apr 2023 14:34:38 +0000 (16:34 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 May 2023 12:06:43 +0000 (14:06 +0200)
src/libstrongswan/asn1/asn1.c
src/libstrongswan/asn1/asn1_parser.c

index cf684e72036c774e6f6ec93a7faed6ae627ee27e..866b3c85758733db141bd6c297e3037c8614ff9f 100644 (file)
@@ -548,9 +548,10 @@ void asn1_debug_simple_object(chunk_t object, asn1_t type, bool private)
                case ASN1_UTCTIME:
                case ASN1_GENERALIZEDTIME:
                        {
+#if DEBUG_LEVEL >= 2
                                time_t time = asn1_to_time(&object, type);
-
                                DBG2(DBG_ASN, "  '%T'", &time, TRUE);
+#endif
                        }
                        return;
                default:
index ef724ada73d33f74a98be2523b0a24e8320bf35c..e48ac3c11d3872cadf92f6b1ed56f18767ee0ee4 100644 (file)
@@ -89,7 +89,7 @@ METHOD(asn1_parser_t, iterate, bool,
 {
        chunk_t *blob, *blob1, blob_ori;
        u_char *start_ptr;
-       u_int level;
+       u_int level DBG_UNUSED;
        asn1Object_t obj;
 
        *object = chunk_empty;