Bug 3928 - fnttosfnt: too many characters in string initializition
Summary: fnttosfnt: too many characters in string initializition
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/other (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: janitor
: 14629 14930 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-31 06:00 UTC by Alan Coopersmith
Modified: 2008-05-02 10:03 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Alan Coopersmith 2005-07-31 06:00:04 UTC
When building the Xorg modular tree, this warning is seen in the fnttosfnt build:
"write.c", line 1033: warning: 9 extra byte(s) in string literal initializer ignored

That line of write.c is:
    char name[16] = XVENDORNAME" font    ";

But the modular makefile.am has these definitions:
 -DXVENDORNAME=\"X.org\ Foundation\" -DXVENDORNAMESHORT=\"X.org\"

Most of the other references in fnttosfnt source appear to be to 
XVENDORNAMESHORT. Should that be used here as well or does the length
of the name string need to be extended?
Comment 1 Daniel Stone 2007-02-27 01:27:32 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Alan Coopersmith 2008-02-22 15:53:37 UTC
*** Bug 14629 has been marked as a duplicate of this bug. ***
Comment 3 Julien Cristau 2008-03-10 06:12:12 UTC
*** Bug 14930 has been marked as a duplicate of this bug. ***
Comment 4 Ralf Lehmann 2008-03-10 07:46:39 UTC
This bug is from 2005!
Nobody here that could answer the simple question if we should use XVENDORNAMESHORT or extend the size?
Comment 5 Daniel Stone 2008-03-10 08:05:04 UTC
Use SHORT.
Comment 6 Juliusz Chroboczek 2008-03-10 15:29:27 UTC
This particular string MUST be exactly 16 characters long.  Its value is completely arbitrary -- I don't know of any contemporary software that uses the PCLT table at all.

I suggest that you avoid using a macro, and choose a literal string that is exactly 16 characters long.  Really, you should not worry about the contents, and avoid using a macro, just choose a random 16-byte-long string.

I suggest "Szczebrzeszyn   ".

(I'll just mention that I'm the original author of this code.)

--Juliusz

P.S. Thanks to Alan for CC-ing me.
Comment 7 Juliusz Chroboczek 2008-05-02 10:03:19 UTC
commit bbab34919743990bf87935480092f7644f8f02fc
Author: James Cloos <cloos@jhcloos.com>
Date:   Thu Mar 13 13:19:11 2008 -0400

    Iā€™m not sure the PCLT table is needed by the fonts generated here, but
    use a fixed 16 char string as the initializer for the PCLT Fontname field
    to silence the warning (or error for some compilers) as reported in bugzilla


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.