mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 15:13:31 -04:00
Fixes build failure due to -Wincompatible-pointer-types Closes: https://bugs.gentoo.org/928331 Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
29 lines
958 B
Diff
29 lines
958 B
Diff
https://github.com/NICMx/FORT-validator/pull/137
|
|
|
|
Since we don't manipulate any struct members, I believe we can safely take a
|
|
const xmlError * argument instead, as per libxml2's documentation .
|
|
|
|
I also believe we can drop the string-termination handling, because C strings
|
|
end with \0 and therefore ptr[strlen(ptr)-1] is always \0.
|
|
|
|
Author: Lucio Sauer <watermanpaint@posteo.net>
|
|
--- a/src/xml/relax_ng.c
|
|
+++ b/src/xml/relax_ng.c
|
|
@@ -36,14 +36,9 @@ relax_ng_log_warn(void *ctx, const char *msg, ...)
|
|
}
|
|
|
|
static void
|
|
-relax_ng_log_str_err(void *userData, xmlErrorPtr error)
|
|
+relax_ng_log_str_err(void *userData, const xmlError *error)
|
|
{
|
|
- char *ptr;
|
|
-
|
|
- ptr = error->message;
|
|
- if (ptr[strlen(ptr) - 1] == '\n')
|
|
- ptr[strlen(ptr) - 1] = '\0';
|
|
- pr_val_err("%s (at line %d)", ptr, error->line);
|
|
+ pr_val_err("%s (at line %d)", error->message, error->line);
|
|
}
|
|
|
|
/* Initialize global schema to parse RRDP files */
|