Commit 0f4f3b19 authored by Alex Richardson's avatar Alex Richardson
Browse files

Fix -Werror build failure in synctex parser

I am cross-compiling with clang for FreeBSD and the build is failing with:
error: initializing 'char *' with an expression of type 'const char [1]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Mark the char pointers as const to fix this build failure.
parent 5447aa10
Pipeline #70234 passed with stage
in 10 minutes and 28 seconds
......@@ -1033,9 +1033,9 @@ SYNCTEX_INLINE static synctex_data_p __synctex_data(synctex_node_p node)
} \
return NULL; \
} \
static char *_synctex_data_set_##WHAT(synctex_node_p node, char *new_value) \
static const char *_synctex_data_set_##WHAT(synctex_node_p node, char *new_value) \
{ \
char *old = ""; \
const char *old = ""; \
if (_synctex_data_has_##WHAT(node)) { \
old = node->data[node->class->navigator->size + node->class->modelator->WHAT].as_string; \
node->data[node->class->navigator->size + node->class->modelator->WHAT].as_string = new_value; \
......@@ -2473,7 +2473,7 @@ SYNCTEX_INLINE static synctex_nns_s _synctex_new_child_proxies_to(synctex_node_p
}
return nns;
}
static char *_synctex_node_abstract(synctex_node_p node);
static const char *_synctex_node_abstract(synctex_node_p node);
SYNCTEX_INLINE static synctex_node_p synctex_tree_set_friend(synctex_node_p node, synctex_node_p new_friend)
{
#if defined SYNCTEX_DEBUG && SYNCTEX_DEBUG
......@@ -3057,7 +3057,7 @@ void synctex_node_display(synctex_node_p node)
}
}
}
static char *_synctex_node_abstract(synctex_node_p node)
static const char *_synctex_node_abstract(synctex_node_p node)
{
SYNCTEX_PARAMETER_ASSERT(node || node->class);
return (node && node->class->abstract) ? node->class->abstract(node) : "none";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment