[PATCH 3/3] Update to return a pointer to a const-qualified type to fix warning
Rudi Heitbaum
rudi at heitbaum.com
Sat Jan 31 02:27:33 CET 2026
../../src/misc.c: In function '_gcry_log_printsxp':
../../src/misc.c:439:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
439 | pend = strchr (p, '\n');
| ^
---
src/misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/misc.c b/src/misc.c
index b1e8eb1c..3c6fe931 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -422,8 +422,8 @@ _gcry_log_printsxp (const char *text, gcry_sexp_t sexp)
{
int any = 0;
int n_closing;
- char *buf, *pend;
- const char *p;
+ char *buf;
+ const char *p, *pend;
size_t size;
size = sexp_sprint (sexp, GCRYSEXP_FMT_ADVANCED, NULL, 0);
--
2.51.0
More information about the Gnupg-devel
mailing list