]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Initialize command for spools printer control
authorAndreas Schneider <asn@samba.org>
Wed, 19 May 2021 16:32:27 +0000 (18:32 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 20 May 2021 11:12:28 +0000 (11:12 +0000)
./../source3/smbd/lanman.c: In function ‘api_WPrintQueueCtrl’:
../../source3/smbd/lanman.c:3342:9: error: ‘command’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/lanman.c

index 92239273c15b3db07b04d9ccb355b00b51eefb22..9194113e7686f217e7fdc3f71bdb077c7acf3ef5 100644 (file)
@@ -3260,7 +3260,7 @@ static bool api_WPrintQueueCtrl(struct smbd_server_connection *sconn,
        struct spoolss_SetPrinterInfoCtr info_ctr;
        struct spoolss_DevmodeContainer devmode_ctr;
        struct sec_desc_buf secdesc_ctr;
-       enum spoolss_PrinterControl command;
+       enum spoolss_PrinterControl command = SPOOLSS_PRINTER_CONTROL_UNPAUSE;
 
        if (!str1 || !str2 || !QueueName) {
                return False;