Bug 690673 - several compiler warnings
Summary: several compiler warnings
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: fitz (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P4 normal
Assignee: Tor Andersson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-31 05:33 UTC by zeniko
Modified: 2010-07-02 02:03 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.