When building xorg-x11-font-utils-7.2 on Linux or Moblin OS using icc compiler, an error will be reported:
write.c: error: a value of type "char " cannot be used to initialize an entity of type "char "
gcc build can work successfully.
xorg-x11-font-utils-7.x for Linux or Moblin
icc version 11.x
gcc version 4.x
Root Cause :
The root cause is the ICC compiler gives more strict check for string initialization. For the below char initialization,
icc reports error while gcc reports warning.
In the xorg-x11-font-utils application, file fonttosfnt-1.0.3/write.c, around line 1033, the chars with size 26 is used to initialize the chars with size 16 which induced the ICC error.
Please fix the application code if such error occurs. In the xorg-x11-font-utils application, as a simple workaround, you can goto the application source folder, open file fonttosfnt-1.0.3/Makefile.in, search XVENDORNAME, change -DXVENDORNAME=\"X.org\ Foundation\" to -DXVENDORNAME=\"X.org\", then rebuild the application with icc compiler.
You can also fix the code in the write.c file. But note the fix may impact the other files if the string size is changed.
Build xorg-x11-font-utils using Intel compiler