From 68e3ee67c07282c11cd144fbdb767b41a6dacc4e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 6 Feb 2016 14:18:32 -0800 Subject: xcms: use size_t for pointer offsets passed to strncmp instead of converting to int and back Fixes clang warnings of the form: HVC.c:190:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (strncmp(spec, _XcmsTekHVC_prefix, n) != 0) { ~~~~~~~ Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/HVC.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/lib/X11/HVC.c') diff --git a/nx-X11/lib/X11/HVC.c b/nx-X11/lib/X11/HVC.c index c6bf2cda4..98d7142c3 100644 --- a/nx-X11/lib/X11/HVC.c +++ b/nx-X11/lib/X11/HVC.c @@ -176,13 +176,13 @@ TekHVC_ParseString( * XcmsSuccess if valid. */ { - int n; + size_t n; char *pchar; if ((pchar = strchr(spec, ':')) == NULL) { return(XcmsFailure); } - n = (int)(pchar - spec); + n = (size_t)(pchar - spec); /* * Check for proper prefix. -- cgit v1.2.3