From d649be59fe332289ed79c0044de588a08c7eb192 Mon Sep 17 00:00:00 2001 From: msweet Date: Fri, 29 Jan 2016 20:00:14 +0000 Subject: [PATCH] Fix compiler warning. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@13072 a1ca3aef-8c08-0410-bb20-df032aa958be --- cups/dest.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cups/dest.c b/cups/dest.c index 0ca5b3339..a87ebed05 100644 --- a/cups/dest.c +++ b/cups/dest.c @@ -122,7 +122,7 @@ typedef struct _cups_dnssd_resolve_s /* Data for resolving URI */ #ifdef __APPLE__ static CFArrayRef appleCopyLocations(void); static CFStringRef appleCopyNetwork(void); -static char *appleGetPaperSize(char *name, int namesize); +static char *appleGetPaperSize(char *name, size_t namesize); static CFStringRef appleGetPrinter(CFArrayRef locations, CFStringRef network, CFIndex *locindex); #endif /* __APPLE__ */ @@ -2500,8 +2500,8 @@ appleCopyNetwork(void) */ static char * /* O - Default paper size */ -appleGetPaperSize(char *name, /* I - Paper size name buffer */ - int namesize) /* I - Size of buffer */ +appleGetPaperSize(char *name, /* I - Paper size name buffer */ + size_t namesize) /* I - Size of buffer */ { CFStringRef defaultPaperID; /* Default paper ID */ pwg_media_t *pwgmedia; /* PWG media size */ @@ -2510,8 +2510,7 @@ appleGetPaperSize(char *name, /* I - Paper size name buffer */ defaultPaperID = _cupsAppleCopyDefaultPaperID(); if (!defaultPaperID || CFGetTypeID(defaultPaperID) != CFStringGetTypeID() || - !CFStringGetCString(defaultPaperID, name, namesize, - kCFStringEncodingUTF8)) + !CFStringGetCString(defaultPaperID, name, (CFIndex)namesize, kCFStringEncodingUTF8)) name[0] = '\0'; else if ((pwgmedia = pwgMediaForLegacy(name)) != NULL) strlcpy(name, pwgmedia->pwg, namesize); -- 2.39.2