aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-10-25 17:47:22 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-10-25 17:47:22 +0200
commit122a8cbd4a3053e32bb76e6aa081deb890b10b11 (patch)
treece07d5655031299f78c6760790ce61a428fc65cc
parent9a0c404d5f71f1592c6eaeb9119abc6e3756e525 (diff)
downloadbusybox-w32-122a8cbd4a3053e32bb76e6aa081deb890b10b11.tar.gz
busybox-w32-122a8cbd4a3053e32bb76e6aa081deb890b10b11.tar.bz2
busybox-w32-122a8cbd4a3053e32bb76e6aa081deb890b10b11.zip
hdparm: placate "warning: taking the absolute value of unsigned type"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--miscutils/hdparm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index b453efba9..beabb1ad5 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -996,7 +996,7 @@ static void identify(uint16_t *val)
996 /* check Endian of capacity bytes */ 996 /* check Endian of capacity bytes */
997 nn = val[LCYLS_CUR] * val[LHEADS_CUR] * val[LSECTS_CUR]; 997 nn = val[LCYLS_CUR] * val[LHEADS_CUR] * val[LSECTS_CUR];
998 oo = (uint32_t)val[CAPACITY_LSB] << 16 | val[CAPACITY_MSB]; 998 oo = (uint32_t)val[CAPACITY_LSB] << 16 | val[CAPACITY_MSB];
999 if (abs(mm - nn) > abs(oo - nn)) 999 if (abs((int)(mm - nn)) > abs((int)(oo - nn)))
1000 mm = oo; 1000 mm = oo;
1001 } 1001 }
1002 printf("\tCHS current addressable sectors:%11u\n", mm); 1002 printf("\tCHS current addressable sectors:%11u\n", mm);