[cups.general] Fwd: CUPS STR #1036 updated
Marc Balmer
marc at msys.ch
Tue Dec 28 06:43:13 PST 2004
Anfang der weitergeleiteten E-Mail:
> Von: noreply at cups.org
> Datum: 27. Dezember 2004 15:53:02 GMT+01:00
> An: mbalmer at openbsd.org
> Betreff: CUPS STR #1036 updated
>
>
> Your software trouble report #1036 has been updated. You can check
> the status of the report and add additional comments and/or files
> at the following URL:
>
> http://www.cups.org/str.php?L1036
>
> Summary: char is not signed on all architectures.
> Version: 1.1.23rc1
> Status: 2 - Closed w/o Resolution
> Priority: 3 - Moderate, e.g. unable to print a file or unable to
> compile the software
> Scope: 3 - Applies to all machines, printers, and operating
> systems
> Subsystem: CGI Programs
> Fix Version: Not Applicable
>
> We want to treat this cases as UNSIGNED, because the input name is
> usually
> UTF-8 (or some other 8-bit encoding) and not just ASCII. However,
> mixing
> char * and unsigned char * types is inconvenient, so we just use char *
> and add the necessary >= 0 check for systems that use a signed char by
> default.
>
> Since this is only a compiler warning issue, we will not accept this
> patch.
You are wrong in assuming that this is a compiler only warning. Your
code behaves different on plattforms where char is unsigned (like
macppc/OpenBSD).
If you do not want to use signed char * then you have to rewrite the
test. On platforms with unsigned chars the first test (*ptr >= 0) is
always true.
You really should not trade convenience for buggy code....
- Marc
mbalmer at openbsd.org.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1746 bytes
Desc: not available
URL: <https://lists.cups.org/pipermail/cups/attachments/20041228/ca0d60b7/attachment-0001.bin>
More information about the cups
mailing list