Bug 690673

Summary: several compiler warnings
Product: MuPDF Reporter: zeniko
Component: fitzAssignee: Tor Andersson <tor.andersson>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: unspecified   
Hardware: PC   
OS: Windows XP   
Customer: Word Size: ---

Description zeniko 2009-07-31 05:33:21 UTC
When compiling MuPDF with Visual C++ 2008 (Express), I get the following 
warnings:

Implicit conversion from double to float:
1>mupdf\fitzdraw\pathstroke.c(59) : warning C4305
1>mupdf\fitzdraw\pathstroke.c(65) : warning C4305
1>mupdf\fitzdraw\render.c(198) : warning C4305
1>mupdf\mupdf\pdf_shade1.c(164) : warning C4305
1>mupdf\mupdf\pdf_shade1.c(274) : warning C4305

Conflict between 'signed' and 'unsigned':
1>mupdf\fitz\filt_faxd.c(431) : warning C4018
1>mupdf\fitz\obj_dict.c(23) : warning C4018

Assigning unary minus-operator to unsigned type:
1>mupdf\mupdf\pdf_open.c(116) : warning C4146
1>mupdf\mupdf\pdf_open.c(244) : warning C4146

Please add explicit casts, where these assignments/comparisons are intentional.
Comment 1 Tor Andersson 2010-07-02 02:03:07 UTC
I have removed all use of doubles and fixed the dangerous signed/unsigned conversions. After silencing the compiler about silly warnings like using implicit type casts and "deprecated" POSIX functions, I can compile with no warnings on MSVC 2008 Express.