From: Andreas Schneider Date: Thu, 7 Dec 2017 17:50:20 +0000 (+0100) Subject: s3:rpc_server: Fix size types in spoolss X-Git-Tag: talloc-2.1.12~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3483f955bc5ba5eac90cf38c3e6ca2ee481b53d;p=thirdparty%2Fsamba.git s3:rpc_server: Fix size types in spoolss This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index c9ea400e0a8..2f42e6d4c39 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -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;