In the previous code, the result of 'result' in the argument for
FcFontSetSort() and FcFontSetMatch() wasn't predictable and not reliable to
check if the return value is valid or not. this change is to ensure if it's
performed successfully.
$< isn't supported in BSD make say. $(RM) is pre-defined in GNU make
though, not in BSD make say. so changed to check on configure if it's
pre-defined by make, otherwise set the appropriate command to $(RM).
This would be a workaround until it has the certain pre-defined value.
When adding new functions, if the actual definition doesn't match the
header (say due to a typo), the regeneration of the internal headers
get confused and output bad cpp logic. This causes gcc to barf due
to mismatched #ifdef/#endif. Which is a pain to figure out due to
the sheer voulme of generated code.
So tweak the makealias script to detect this case and error out.
While we're here, improve the cpp output a bit to indent, include
comments, and merge similar ifdef blocks.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Newer gcc doesn't like when you switch on an enum and use a value
that isn't declared:
fcname.c: In function 'FcObjectValidType':
fcname.c:299:2: warning: case value '4294967295'
not in enumerated type 'FcType' [-Wswitch]
So tweak the logic to avoid this warning.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Latest configure code will setup FC_ARCHITECTURE directly rather than
going through ARCHITECTURE, so update fcarch.h accordingly.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
We don't free this string anywhere, so mark it const to avoid gcc warnings
and possible bugs in the future (if people did try freeing it).
fc-list.c: In function 'main':
fc-list.c:161:16: warning: pointer targets in assignment
differ in signedness [-Wpointer-sign]
fc-match.c: In function 'main':
fc-match.c:201:13: warning: pointer targets in assignment
differ in signedness [-Wpointer-sign]
fc-match.c:203:13: warning: pointer targets in assignment
differ in signedness [-Wpointer-sign]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
These funcs don't modify the incoming string, so add const markings.
This is the "right thing", shouldn't change the ABI, and fixes some
gcc warnings:
fccfg.c: In function 'FcConfigEvaluate':
fccfg.c:916:2: warning: passing argument 1 of 'IA__FcNameConstant'
discards 'const' qualifier from pointer target type [enabled by default]
fcalias.h:253:34: note: expected 'FcChar8 *' but
argument is of type 'const FcChar8 *'
fcxml.c: In function 'FcTypecheckExpr':
fcxml.c:604:2: warning: passing argument 1 of 'IA__FcNameGetConstant'
discards 'const' qualifier from pointer target type [enabled by default]
fcalias.h:251:37: note: expected 'FcChar8 *' but
argument is of type 'const FcChar8 *'
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Add a cast to avoid a gcc warning:
fc-cat.c: In function 'cache_print_set':
fc-cat.c:230:2: warning: pointer targets in passing argument 2
of 'FcPatternFormat' differ in signedness [-Wpointer-sign]
../fontconfig/fontconfig.h:860:1: note:
expected 'const FcChar8 *' but argument is of type 'char *'
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This shouldn't affect the ABI, makes FcStat more like the rest of the
fontconfig API, and fixes warnings where we pass FcChar8* pointers in
to this func from other places.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
We've already calculated the lengths of these strings, so re-use those
values to avoid having to rescan the strings multiple times.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>