s3:rpc_server: Fix size types in spoolss
authorAndreas Schneider <asn@samba.org>
Thu, 7 Dec 2017 17:50:20 +0000 (18:50 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 20 Mar 2018 22:16:16 +0000 (23:16 +0100)
This fixes compilation with -Wstrict-overflow=2

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpc_server/spoolss/srv_spoolss_nt.c

index c9ea400e0a84f408166e8a79f3f41e8ee55fd725..2f42e6d4c397ce306345687fde8636a0f23a5bcb 100644 (file)
@@ -1090,13 +1090,13 @@ static int build_notify2_messages(TALLOC_CTX *mem_ctx,
                                  SPOOLSS_NOTIFY_MSG *messages,
                                  uint32_t num_msgs,
                                  struct spoolss_Notify **_notifies,
-                                 int *_count)
+                                 size_t *_count)
 {
        struct spoolss_Notify *notifies;
        SPOOLSS_NOTIFY_MSG *msg;
-       int count = 0;
+       size_t count = 0;
        uint32_t id;
-       int i;
+       uint32_t i;
 
        notifies = talloc_zero_array(mem_ctx,
                                     struct spoolss_Notify, num_msgs);
@@ -1189,7 +1189,7 @@ static int send_notify2_printer(TALLOC_CTX *mem_ctx,
                                SPOOLSS_NOTIFY_MSG_GROUP *msg_group)
 {
        struct spoolss_Notify *notifies;
-       int count = 0;
+       size_t count = 0;
        union spoolss_ReplyPrinterInfo info;
        struct spoolss_NotifyInfo info0;
        uint32_t reply_result;