Skip to content
Snippets Groups Projects
Commit 9e88558e authored by Kacper Michajłow's avatar Kacper Michajłow
Browse files

shaders: add #line before generated function starts

This fixes errors with coverage intrumentation enabled:

error: function starts on a higher line number than it ends
[-Werror=coverage-invalid-line-number]

It's still not perfect, as we can have colisions of the line numbers
between call site and function site. Probably would be better to
generate functions in separate file and #include it. Then the line
numbering will refer to different file name.

But for now this fixes the build with GCC 13.
parent 7ceb0fb3
No related branches found
No related tags found
1 merge request!690ci: update docker image to noble
#line {{ macro.linenr - 1 }}
size_t {{ macro.name }}_fn(void *alloc, pl_str *buf, const uint8_t *ptr);
size_t {{ macro.name }}_fn(void *alloc, pl_str *buf, const uint8_t *ptr)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment