From 47480475c99335c1203e81662f815b62573c19e8 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Wed, 13 Oct 2010 11:50:57 -0400 Subject: [PATCH] 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 --- utils/mount/version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.39.2