GNOME Bugzilla – Bug 337029
pango/fonts.c: Illegal structure initialization
Last modified: 2006-04-03 15:20:43 UTC
Please describe the problem: str[16] in the structure FieldMap is arrary, it's not pointer. But str[16] is initialized by NULL at style_map, variant_map, weight_map and stretch_map. NULL is defined as pointer. Steps to reproduce: 1. compile by Visual C++ Actual results: following messages are displayed. fonts.c(760) : error C4047: 'initializing' : 'const char' differs in levels of indirection from 'void *' fonts.c(766) : error C4047: 'initializing' : 'const char' differs in levels of indirection from 'void *' fonts.c(773) : error C4047: 'initializing' : 'const char' differs in levels of indirection from 'void *' fonts.c(786) : error C4047: 'initializing' : 'const char' differs in levels of indirection from 'void *' Expected results: Use zero length string instead of NULL. For exsample, static const FieldMap style_map[] = { { PANGO_STYLE_NORMAL, "" }, { PANGO_STYLE_OBLIQUE, "Oblique" }, { PANGO_STYLE_ITALIC, "Italic" } }; Does this happen every time? Other information:
Thanks. 2006-04-03 Behdad Esfahbod <behdad@gnome.org> Bug 337029 – pango/fonts.c: Illegal structure initialization * pango/fonts.c: Change NULL's to ""'s after previous change, and fix code to follow.