Ticket #2142 (closed defect: fixed)
mappdf.c build warning - and why lookup fontlist?
| Reported by: | dmorissette | Owned by: | zjames |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.0 release |
| Component: | Output-PDF | Version: | 5.0 |
| Severity: | normal | Keywords: | |
| Cc: | zjames@… |
Description
mappdf.c produces the following warning:
mappdf.c: In function ‘msDrawTextPDF’: mappdf.c:1276: warning: assignment makes integer from pointer without a cast
This is happening on a line doing a lookup of the font name in the fontset:
font = msLookupHashTable(&(fontset->fonts), label->font);
if(!font)
{
msSetError(MS_TTFERR, "Requested font (%s) not found.", "msDrawTextPDF()",
label->font);
return(-1);
}
And then the 'font' value is not reused anywhere in the function. Actually font is set to the return value from a call to PDF_findfont() later on.
What is the correct fix? Why lookup the font name if the fontset if we don't need the value? Is this a sign that the original code logic may have been broken by some past changes?
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

