summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorRalph Giles <giles@ghostscript.com>2009-08-19 19:22:22 +0200
committerRalph Giles <giles@ghostscript.com>2009-08-19 19:22:22 +0200
commitfd2ea36e0848223b58c09c292a551b696a955585 (patch)
tree6a26e4dd05e0ff24382df97c7b46ab7a5e305651 /fitz
parentcfeb58fa4694a133e3037b6eccf526389cbffda2 (diff)
downloadmupdf-fd2ea36e0848223b58c09c292a551b696a955585.tar.xz
More portable fix for pointer alignments.
The previous patch cast the pointer to (unsigned long) which fixed a truncation warning on 64 bit Linux, but didn't help on Win64. Casting to (size_t) is a little more portable, but mupdf doesn't use that type. Casting to (char*) and substractiong (char*)0 is the best solution for this. It looks a little messy; if more such checks are added, I suggest moving to a macro: #define PTR_ALIGN4(ptr) (!((char *)(ptr) - (char *)0) & 3)) However, the pointer in rendersolid() is already an (unsigned) char pointer. The check in decodetile() is actually checking an unsigned int pointer for 4-octet alignment, so I don't see how that can ever fail.
Diffstat (limited to 'fitz')
0 files changed, 0 insertions, 0 deletions