Embedded Linux Library
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: ell@lists.linux.dev
Cc: Bastien Nocera <hadess@hadess.net>
Subject: [PATCH 3/4] ell: Fix cert_pkcs12_pbkdf() warning under Alpine/clang
Date: Tue, 17 Mar 2026 15:28:56 +0100	[thread overview]
Message-ID: <20260317143018.628844-4-hadess@hadess.net> (raw)
In-Reply-To: <20260317143018.628844-1-hadess@hadess.net>

Disable GCC specific warning under clang.

../ell/cert-crypto.c:235:1: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
  235 | _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
      | ^
<scratch space>:28:25: note: expanded from here
   28 |  GCC diagnostic ignored "-Wmaybe-uninitialized"
      |                         ^
1 warning generated.
../ell/cert-crypto.c:235:1: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
  235 | _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
      | ^
<scratch space>:28:25: note: expanded from here
   28 |  GCC diagnostic ignored "-Wmaybe-uninitialized"
      |                         ^
1 warning generated.
---
 ell/cert-crypto.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ell/cert-crypto.c b/ell/cert-crypto.c
index d6babe007d1c..de416050bfb5 100644
--- a/ell/cert-crypto.c
+++ b/ell/cert-crypto.c
@@ -231,8 +231,10 @@ uint8_t *cert_pkcs12_pbkdf(const char *password,
 		ptr += s_len + salt_len - j;
 	}
 
+#if defined(__GNUC__) && !defined(__clang__)
 _Pragma("GCC diagnostic push")
 _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+#endif /* gcc && !clang */
 	if (p_len) {
 		for (j = passwd_len; j < p_len;
 					j += passwd_len, ptr += passwd_len)
@@ -243,7 +245,9 @@ _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 		explicit_bzero(bmpstring, passwd_len);
 		l_free(bmpstring);
 	}
+#if defined(__GNUC__) && !defined(__clang__)
 _Pragma("GCC diagnostic pop")
+#endif /* gcc && !clang */
 
 	key = l_malloc(key_len + hash->len);
 
-- 
2.53.0


  parent reply	other threads:[~2026-03-17 14:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 14:28 [PATCH 0/4] More build fixes Bastien Nocera
2026-03-17 14:28 ` [PATCH 1/4] unit: Fix incorrect basename usage Bastien Nocera
     [not found]   ` <D98F0DC1-9621-4E61-887A-CCA145F16AFF@bluewin.ch>
2026-03-18 16:17     ` Bastien Nocera
2026-03-17 14:28 ` [PATCH 2/4] ell: Fix rawmemchr implementation warning in Alpine/clang Bastien Nocera
2026-03-17 14:28 ` Bastien Nocera [this message]
2026-03-17 14:28 ` [PATCH 4/4] unit: Skip hwdb test when hwdb isn't available Bastien Nocera
2026-04-16  9:18 ` [PATCH 0/4] More build fixes Bastien Nocera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260317143018.628844-4-hadess@hadess.net \
    --to=hadess@hadess.net \
    --cc=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox