plotHP.c: warning: incompatible pointer types passing 'int *' to ...

Perform pointer arithmatic with (int *) first then cast just for calling function.

plotHP.c:335:25: warning: incompatible pointer types passing 'int *' to parameter of type 'unsigned char *'
plotHP.c:339:25: warning: incompatible pointer types passing 'int *' to parameter of type 'unsigned char *'
plotHP.c:343:25: warning: incompatible pointer types passing 'int *' to parameter of type 'unsigned char *'

clang18 default warning cleanup [-Wincompatible-pointer-types]
This commit is contained in:
Darryl L. Miles 2024-10-04 18:57:20 +01:00 committed by Tim Edwards
parent 165f1b35b4
commit 8f2acb83f9
1 changed files with 3 additions and 3 deletions

View File

@ -332,15 +332,15 @@ PlotDumpHPRTL(hpfile, kRaster, cRaster, mRaster, yRaster)
/* Compress each plane (C, M, and Y) and output */
size = PlotRTLCompress(c - ipl, obytes, bpl);
size = PlotRTLCompress((unsigned char *)(c - ipl), obytes, bpl);
fprintf(hpfile, "\033*b%dV", size);
fwrite(obytes, size, 1, hpfile);
size = PlotRTLCompress(m - ipl, obytes, bpl);
size = PlotRTLCompress((unsigned char *)(m - ipl), obytes, bpl);
fprintf(hpfile, "\033*b%dV", size);
fwrite(obytes, size, 1, hpfile);
size = PlotRTLCompress(y - ipl, obytes, bpl);
size = PlotRTLCompress((unsigned char *)(y - ipl), obytes, bpl);
fprintf(hpfile, "\033*b%dW", size);
fwrite(obytes, size, 1, hpfile);
}