mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
configure: avoid warning with -Wall
7228fe68
("configure: restructure gmime cert validity checker code",
2022-04-09) restructured generated C code to repurpose it later on. This
put usage of `validity` within an `#if`, resulting in an "unused
warning" if that `#if` is not executed.
Put the variable declariation inside the same if branch and, thus, quel
the warning.
Signed-off-by: Michael J Gruber <git@grubix.eu>
This commit is contained in:
parent
7dd6dacb10
commit
0d0cc2a547
1 changed files with 1 additions and 2 deletions
3
configure
vendored
3
configure
vendored
|
@ -564,7 +564,6 @@ int main () {
|
||||||
GMimeSignature *sig = NULL;
|
GMimeSignature *sig = NULL;
|
||||||
GMimeCertificate *cert = NULL;
|
GMimeCertificate *cert = NULL;
|
||||||
GMimeObject *output = NULL;
|
GMimeObject *output = NULL;
|
||||||
GMimeValidity validity = GMIME_VALIDITY_UNKNOWN;
|
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
g_mime_init ();
|
g_mime_init ();
|
||||||
|
@ -586,7 +585,7 @@ int main () {
|
||||||
cert = g_mime_signature_get_certificate (sig);
|
cert = g_mime_signature_get_certificate (sig);
|
||||||
if (cert == NULL) return !! fprintf (stderr, "no GMimeCertificate found\n");
|
if (cert == NULL) return !! fprintf (stderr, "no GMimeCertificate found\n");
|
||||||
#ifdef CHECK_VALIDITY
|
#ifdef CHECK_VALIDITY
|
||||||
validity = g_mime_certificate_get_id_validity (cert);
|
GMimeValidity validity = g_mime_certificate_get_id_validity (cert);
|
||||||
if (validity != GMIME_VALIDITY_FULL) return !! fprintf (stderr, "Got validity %d, expected %d\n", validity, GMIME_VALIDITY_FULL);
|
if (validity != GMIME_VALIDITY_FULL) return !! fprintf (stderr, "Got validity %d, expected %d\n", validity, GMIME_VALIDITY_FULL);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CHECK_EMAIL
|
#ifdef CHECK_EMAIL
|
||||||
|
|
Loading…
Reference in a new issue