From: Chuck Lever Date: Wed, 13 Oct 2010 15:50:57 +0000 (-0400) Subject: mount.nfs: Eliminate compiler warnings in utils/mount/version.h X-Git-Tag: nfs-utils-1-2-4-rc1~11 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=47480475c99335c1203e81662f815b62573c19e8;p=nfs-utils.git mount.nfs: Eliminate compiler warnings in utils/mount/version.h Clean up. In file included from mount.c:50: version.h: In function linux_version_code: version.h:48: warning: conversion to unsigned int from int may change the sign of the result version.h:48: warning: conversion to unsigned int from int may change the sign of the result version.h:48: warning: conversion to unsigned int from int may change the sign of the result Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/utils/mount/version.h b/utils/mount/version.h index 46552a1..af61a6f 100644 --- a/utils/mount/version.h +++ b/utils/mount/version.h @@ -42,9 +42,9 @@ static inline unsigned int linux_version_code(void) if (uname(&my_utsname)) return 0; - p = atoi(strtok(my_utsname.release, ".")); - q = atoi(strtok(NULL, ".")); - r = atoi(strtok(NULL, ".")); + p = (unsigned int)atoi(strtok(my_utsname.release, ".")); + q = (unsigned int)atoi(strtok(NULL, ".")); + r = (unsigned int)atoi(strtok(NULL, ".")); return MAKE_VERSION(p, q, r); }