From: msweet Date: Fri, 29 Jan 2016 20:00:14 +0000 (+0000) Subject: Fix compiler warning. X-Git-Tag: v2.2b1~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d649be59fe332289ed79c0044de588a08c7eb192;p=thirdparty%2Fcups.git Fix compiler warning. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@13072 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/cups/dest.c b/cups/dest.c index 0ca5b33398..a87ebed052 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);