pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Problems with task #64


From: gerel
Subject: Re: [pdf-devel] Problems with task #64
Date: Wed, 03 Sep 2008 16:17:55 -0700 (PDT)

You may have a point but I can't see it. See the output I get when changing
pdf_char_t to 'char' with the -funsigned-char flag and without it (on intel).

char without -funsigned-char
##
base/pdf-stm-f-rl.c:180: warning: comparison is always false due to limited 
range of data type
base/pdf-stm-f-rl.c:185: warning: comparison is always true due to limited 
range of data type
base/pdf-stm-f-rl.c:202: warning: comparison is always false due to limited 
range of data type

base/pdf-stm.c:537: warning: passing argument 2 of 'stm->backend.funcs.read' 
from incompatible pointer type
base/pdf-stm.c:548: warning: passing argument 2 of 'pdf_stm_apply_filters' from 
incompatible pointer type
base/pdf-stm.c:563: warning: passing argument 2 of 'pdf_stm_apply_filters' from 
incompatible pointer type
base/pdf-stm.c:569: warning: pointer targets in passing argument 2 of 
'stm->backend.funcs.write' differ in signedness

base/pdf-stm-f-flate.c:116: warning: pointer targets in passing argument 1 of 
'compress' differ in signedness
base/pdf-stm-f-flate.c:116: warning: pointer targets in passing argument 3 of 
'compress' differ in signedness
base/pdf-stm-f-flate.c:152: warning: pointer targets in assignment differ in 
signedness
base/pdf-stm-f-flate.c:162: warning: pointer targets in assignment differ in 
signedness
###

char with -funsigned-char
##
base/pdf-stm.c:537: warning: passing argument 2 of 'stm->backend.funcs.read' 
from incompatible pointer type
base/pdf-stm.c:548: warning: passing argument 2 of 'pdf_stm_apply_filters' from 
incompatible pointer type
base/pdf-stm.c:563: warning: passing argument 2 of 'pdf_stm_apply_filters' from 
incompatible pointer type
base/pdf-stm.c:569: warning: pointer targets in passing argument 2 of 
'stm->backend.funcs.write' differ in signedness

base/pdf-stm-f-flate.c:116: warning: pointer targets in passing argument 1 of 
'compress' differ in signedness
base/pdf-stm-f-flate.c:116: warning: pointer targets in passing argument 3 of 
'compress' differ in signedness
base/pdf-stm-f-flate.c:152: warning: pointer targets in assignment differ in 
signedness
base/pdf-stm-f-flate.c:162: warning: pointer targets in assignment differ in 
signedness
###

I don't consider either one as a 'soulution' per se, I mean, if we start using
that flag, our code will be full of "(signed char*)". Am I wrong ?

Also note that while we get rid of the byte range issue in pdf-stm-f-rl.c the
type warnings are still there.
A solution to me means getting rid of those warnings not just the byte range
issue, because at the end problems with bype range are the odds. :-/

We keep casting like god orders.  Unless we define a pdf_uchar_t (unsigned one)
and pdf_char_t (signed one).

Or maybe with some black macro magic ?

char...ming 
  \ | /
  - * -
  / | \
    | 
    |
    |

cheers

-gerel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]