mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 01:27:35 -05:00
A bunch of further warning fixes in the Windows code.
These ones are stylistic rather than potential bugs: mostly signedness of char pointers in cases where they clearly aren't going to cause the wrong thing to actually happen, and one thing in winsecur.c where clang would have preferred an extra pair of braces around some initialisers but it's legal with or without. But since some of clang's warnings turn out to be quite useful, it seems worth silencing these harmless ones so as to be able to see the rest.
This commit is contained in:
@ -30,7 +30,7 @@ static int printer_add_enum(int param, DWORD level, char **buffer,
|
||||
* we'll need for the output. Discard the return value since it
|
||||
* will almost certainly be a failure due to lack of space.
|
||||
*/
|
||||
EnumPrinters(param, NULL, level, (*buffer)+offset, 512,
|
||||
EnumPrinters(param, NULL, level, (LPBYTE)((*buffer)+offset), 512,
|
||||
&needed, &nprinters);
|
||||
|
||||
if (needed < 512)
|
||||
@ -38,7 +38,7 @@ static int printer_add_enum(int param, DWORD level, char **buffer,
|
||||
|
||||
*buffer = sresize(*buffer, offset+needed, char);
|
||||
|
||||
if (EnumPrinters(param, NULL, level, (*buffer)+offset,
|
||||
if (EnumPrinters(param, NULL, level, (LPBYTE)((*buffer)+offset),
|
||||
needed, &needed, &nprinters) == 0)
|
||||
return FALSE;
|
||||
|
||||
@ -139,7 +139,7 @@ printer_job *printer_start_job(char *printer)
|
||||
docinfo.pOutputFile = NULL;
|
||||
docinfo.pDatatype = "RAW";
|
||||
|
||||
if (!StartDocPrinter(ret->hprinter, 1, (LPSTR)&docinfo))
|
||||
if (!StartDocPrinter(ret->hprinter, 1, (LPBYTE)&docinfo))
|
||||
goto error;
|
||||
jobstarted = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user