Ticket #1237 (new defect)

Opened 8 years ago

Last modified 8 years ago

[PATCH] Make sure enums are passed as such to msCalculateScale() and msInchesPerUnit() + fix argument type

Reported by: pere@… Owned by: mapserverbugs
Priority: high Milestone:
Component: Build Problems Version: 4.4
Severity: normal Keywords:
Cc:

Description

The units argument passed to msCalculateScale() and msInchesPerUnit()
is used as if it is an enum.  Convert the argument to an enum to avoid
compile warnings.  Also, make sure the second arguemnt passed to
msInchesPerUnit() is a floating point value, to avoid implicit type
conversion.

Attachments

scale-enums.diff Download (3.3 KB) - added by pere@… 8 years ago.
Patch to fix the enum issues in mapscale.c

Change History

Changed 8 years ago by pere@…

Patch to fix the enum issues in mapscale.c

Changed 8 years ago by pere@…

By mistake, an UNUSED flag (see bug #1178) was included in this
patch.  It should not be part of this patch, and will break the
compile until bug #1178 is fixed.  Please remove it when applying
this patch.
Note: See TracTickets for help on using tickets.