String template generates C warning when targetting libc only
When using --profile=posix
to target libc only, the following code:
void main () {
var a = 10;
print( @"Result: $(a)\n" );
}
generates parameter type warnings from the C compiler:
/string_libc_profile_test.vala.c: In function ‘string_concat’:
/string_libc_profile_test.vala.c:31:21: warning: passing argument 1 of ‘_strdup0’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
_tmp0_ = _strdup0 (self);
^
/string_libc_profile_test.vala.c:18:1: note: expected ‘void *’ but argument is of type ‘const char *’
_strdup0 (void * self)
^
When compiling without profile=posix
there are no warnings.