After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 337029 - pango/fonts.c: Illegal structure initialization
pango/fonts.c: Illegal structure initialization
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: win32
1.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-04-03 13:22 UTC by Kazuki Iwamoto
Modified: 2006-04-03 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2006-04-03 13:22:29 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:
Comment 1 Behdad Esfahbod 2006-04-03 15:20:43 UTC
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.