From bddf6c569289221ba0a7b9493d36cf540481d8db Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 18 Aug 2025 14:14:16 +0200 Subject: [PATCH] [channels,printer] fix missing const casts --- channels/printer/client/win/printer_win.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/printer/client/win/printer_win.c b/channels/printer/client/win/printer_win.c index 213a6aec5..ea4da1987 100644 --- a/channels/printer/client/win/printer_win.c +++ b/channels/printer/client/win/printer_win.c @@ -118,7 +118,7 @@ static UINT printer_win_write_printjob(rdpPrintJob* printjob, const BYTE* data, return ERROR_BAD_ARGUMENTS; DWORD cbBuf = WINPR_ASSERTING_INT_CAST(uint32_t, size); - if (!WritePrinter(printer->hPrinter, pBuf, cbBuf, &pcWritten)) + if (!WritePrinter(printer->hPrinter, WINPR_CAST_CONST_PTR_AWAY(pBuf, void*), cbBuf, &pcWritten)) return ERROR_INTERNAL_ERROR; return CHANNEL_RC_OK; } @@ -267,7 +267,7 @@ static rdpPrinter* printer_win_new_printer(rdpWinPrinterDriver* win_driver, cons win_printer->printer.AddRef = printer_win_add_ref_printer; win_printer->printer.ReleaseRef = printer_win_release_ref_printer; - if (!OpenPrinter(name, &(win_printer->hPrinter), NULL)) + if (!OpenPrinter(WINPR_CAST_CONST_PTR_AWAY(name, WCHAR*), &(win_printer->hPrinter), NULL)) goto fail; /* How many memory should be allocated for printer data */