mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-12-24 05:56:25 +01:00
Fix some Clang warnings.
This commit is contained in:
@@ -6,6 +6,7 @@ v1.5.5 - YYYY-MM-DD
|
||||
-------------------
|
||||
|
||||
- Fixed TTF cmap underflow error.
|
||||
- Fixed some Clang warnings.
|
||||
|
||||
|
||||
v1.5.4 - 2025-08-26
|
||||
|
||||
@@ -2580,9 +2580,14 @@ copy_jpeg(pdfio_dict_t *dict, // I - Dictionary
|
||||
|
||||
// Expand our ICC buffer...
|
||||
if ((icc_temp = realloc(icc_data, icc_datalen + length)) == NULL)
|
||||
{
|
||||
free(icc_data);
|
||||
return (NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
icc_data = icc_temp;
|
||||
}
|
||||
|
||||
// Read the chunk into the ICC buffer...
|
||||
do
|
||||
|
||||
@@ -1082,7 +1082,7 @@ pdfioFileOpen(
|
||||
pdf->version = strdup(line + 5);
|
||||
|
||||
// Grab the last 1k of the file to find the start of the xref table...
|
||||
if (_pdfioFileSeek(pdf, 1 - sizeof(line), SEEK_END) < 0)
|
||||
if (_pdfioFileSeek(pdf, 1 - (int)sizeof(line), SEEK_END) < 0)
|
||||
{
|
||||
_pdfioFileError(pdf, "Unable to read startxref data.");
|
||||
goto error;
|
||||
@@ -2632,7 +2632,7 @@ write_trailer(pdfio_file_t *pdf) // I - PDF file
|
||||
|
||||
// Write the "free" 0 object...
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
pdfioStreamWrite(xref_st, buffer, offsize + 2);
|
||||
pdfioStreamWrite(xref_st, buffer, (size_t)offsize + 2);
|
||||
|
||||
// Then write the "allocated" objects...
|
||||
buffer[0] = 1;
|
||||
@@ -2702,7 +2702,7 @@ write_trailer(pdfio_file_t *pdf) // I - PDF file
|
||||
#endif // !_WIN32
|
||||
}
|
||||
|
||||
if (!pdfioStreamWrite(xref_st, buffer, offsize + 2))
|
||||
if (!pdfioStreamWrite(xref_st, buffer, (size_t)offsize + 2))
|
||||
{
|
||||
_pdfioFileError(pdf, "Unable to write cross-reference table.");
|
||||
ret = false;
|
||||
|
||||
Reference in New Issue
Block a user