[gs-bugs] [Bug 692520] New: gdevpdfc.c: warning: cast from pointer to integer of different size
bugzilla-daemon at ghostscript.com
bugzilla-daemon at ghostscript.com
Mon Sep 19 19:58:27 UTC 2011
http://bugs.ghostscript.com/show_bug.cgi?id=692520
Summary: gdevpdfc.c: warning: cast from pointer to integer of
different size
Product: Ghostscript
Version: master
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: PDF Writer
AssignedTo: ken.sharp at artifex.com
ReportedBy: cloos at jhcloos.com
QAContact: gs-bugs at ghostscript.com
when compiling ghostscript-9.02, GCC complains:
./base/gdevpdfc.c: In function 'pdf_separation_color_space':
./base/gdevpdfc.c:513:21: warning: cast from pointer to integer of different
size
./base/gdevpdfc.c:548:21: warning: cast from pointer to integer of different
size
Those two lines do:
(code = (int)cos_c_string_value(&v, (const char *)pcsn->DeviceCMYK)) < 0
and:
(code = (int)cos_c_string_value(&v, pcsn->DeviceRGB)) < 0
but cos_c_string_value() is declared:
const cos_value_t *cos_c_string_value(cos_value_t *, const char *);
An int, of course, is too small to hold a ptr on a LP64 arch.
There is a similar problem in the ADJUST_TO_CHUNK macro in gs/base/gsroprun1.h.
That macro also casts a pointer to an int. You may need an I32LP64 version of
that macro for arches like amd64.
the last example is in gs/base/rinkj/evenbetter-rll.c eb_malloc_aligned().
that function will fail only if malloc(3) returns a block which starts just
before address 0x100000000. Which is probably unlikely enough to ignore.
--
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the gs-bugs
mailing list