Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/syslogd sign.c: mark a variable used only in assert...



details:   https://anonhg.NetBSD.org/src/rev/b1d53ba43ec0
branches:  trunk
changeset: 372279:b1d53ba43ec0
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue Nov 08 01:03:27 2022 +0000

description:
sign.c: mark a variable used only in asserts as __diagused

diffstat:

 usr.sbin/syslogd/sign.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r f7f479746460 -r b1d53ba43ec0 usr.sbin/syslogd/sign.c
--- a/usr.sbin/syslogd/sign.c   Mon Nov 07 21:18:49 2022 +0000
+++ b/usr.sbin/syslogd/sign.c   Tue Nov 08 01:03:27 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sign.c,v 1.8 2021/11/27 22:30:26 rillig Exp $  */
+/*     $NetBSD: sign.c,v 1.9 2022/11/08 01:03:27 uwe Exp $     */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: sign.c,v 1.8 2021/11/27 22:30:26 rillig Exp $");
+__RCSID("$NetBSD: sign.c,v 1.9 2022/11/08 01:03:27 uwe Exp $");
 
 #ifndef DISABLE_SIGN
 #include "syslogd.h"
@@ -514,7 +514,7 @@
        char *tstamp;
        char payload[SIGN_MAX_PAYLOAD_LENGTH];
        char sd[SIGN_MAX_SD_LENGTH];
-       size_t payload_len, sd_len, fragment_len;
+       size_t payload_len, fragment_len;
        size_t payload_index = 0;
 
        /* do nothing if CBs already sent or if there was no message in SG */
@@ -540,6 +540,7 @@
                        fragment_len = SIGN_MAX_FRAG_LENGTH;
 
                /* format SD */
+               size_t sd_len __diagused;
                sd_len = snprintf(sd, sizeof(sd), "[ssign-cert "
                    "VER=\"%s\" RSID=\"%" PRIuFAST64 "\" SG=\"%d\" "
                    "SPRI=\"%d\" TBPL=\"%zu\" INDEX=\"%zu\" "



Home | Main Index | Thread Index | Old Index