[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coreutils] [PATCH] sort: avoid gcc warning: explicitly ignore strtold r
From: |
Jim Meyering |
Subject: |
[coreutils] [PATCH] sort: avoid gcc warning: explicitly ignore strtold result |
Date: |
Tue, 10 Aug 2010 17:26:24 +0200 |
I've just tried to build coreutils and got this:
cc1: warnings being treated as errors
sort.c: In function 'debug_key':
sort.c:2207: error: ignoring return value of 'strtold', declared with
attribute warn_unused_result
Here's the fix:
>From ec0d6ddb813e95a01421b45f1743713e88175448 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 10 Aug 2010 08:11:15 -0700
Subject: [PATCH] sort: avoid gcc warning: explicitly ignore strtold result
* src/sort.c: Include "ignore-value.h".
(debug_key): Use ignore_value.
---
src/sort.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/sort.c b/src/sort.c
index 148ed3e..084f4e3 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -35,6 +35,7 @@
#include "hard-locale.h"
#include "hash.h"
#include "heap.h"
+#include "ignore-value.h"
#include "md5.h"
#include "mbswidth.h"
#include "nproc.h"
@@ -2204,7 +2205,7 @@ debug_key (struct line const *line, struct keyfield const
*key)
if (key->month)
getmonth (beg, &tighter_lim);
else if (key->general_numeric)
- strtold (beg, &tighter_lim);
+ ignore_value (strtold (beg, &tighter_lim));
else if (key->numeric || key->human_numeric)
{
char *p = beg + (beg < lim && *beg == '-');
--
1.7.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [coreutils] [PATCH] sort: avoid gcc warning: explicitly ignore strtold result,
Jim Meyering <=