Quentin Rameau writes:
I beg to differ when the code declares something const but later then decides
>The constness is “maintained” here, the function gets a "const FcChar8 *"

That's quite different: the code passes it a FcChar8* which it then treats as a
const FcChar8*. Case in point, GCC 12.1.1 and clang 14.0.6 both generate
different code.

I don't see why it would, and I can't reproduce it with a simple test-case.
Could you share a source/output somewhere of that?

Oh yes, it's for the execvp() changes, not this.

No, because FcChar8 is unsigned, but the default signedness of char may be
either way.

And? FcNameParse will use whatever is passed
as a pointer to an unsigned char.

With GCC 12.1.1 and our provided CFLAGS in config.mk:

    drw.c: In function ‘xfont_create’:
    drw.c:122:45: warning: pointer targets in passing argument 1 of 
‘FcNameParse’ differ in signedness [-Wpointer-sign]
      122 |                 if (!(pattern = FcNameParse(fontname))) {
          |                                             ^~~~~~~~
          |                                             |
          |                                             const char *

Reply via email to