forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kde-misc/kcollectd: Fix building with gcc-6 (bug #613174)
Package-Manager: Portage-2.3.5, Repoman-2.3.2 Closes: gentoo#4247
- Loading branch information
1 parent
5b2854f
commit 7e7ffe5
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Description: fix FTBFS with gcc-6 | ||
Author: Logan Rosen <[email protected]> | ||
Acked-By: Mattia Rizzolo <[email protected]> | ||
Bug-Debian: https://bugs.debian.org/831129 | ||
Last-Update: 2016-10-10 | ||
|
||
--- a/kcollectd/graph.cc | ||
+++ b/kcollectd/graph.cc | ||
@@ -564,9 +564,9 @@ | ||
paint.setPen(Qt::NoPen); | ||
paint.setBrush(QBrush(color_minmax[color_nr++ % 8])); | ||
for(int i=0; i<size; ++i) { | ||
- while (i<size && (isnan(min_data[i]) || isnan(max_data[i]))) ++i; | ||
+ while (i<size && (std::isnan(min_data[i]) || std::isnan(max_data[i]))) ++i; | ||
int l = i; | ||
- while (i<size && !isnan(min_data[i]) && !isnan(max_data[i])) ++i; | ||
+ while (i<size && !std::isnan(min_data[i]) && !std::isnan(max_data[i])) ++i; | ||
const int asize = i-l; | ||
points.resize(asize*2); | ||
int k; | ||
@@ -597,9 +597,9 @@ | ||
if (!avg_data.empty()) { | ||
paint.setPen(color_line[color_nr++ % 8]); | ||
for(int i=0; i<size; ++i) { | ||
- while (i<size && isnan(avg_data[i])) ++i; | ||
+ while (i<size && std::isnan(avg_data[i])) ++i; | ||
int l = i; | ||
- while (i<size && !isnan(avg_data[i])) ++i; | ||
+ while (i<size && !std::isnan(avg_data[i])) ++i; | ||
const int asize = i-l; | ||
points.resize(asize); | ||
for(int k=0; k<asize; ++k, ++l) { | ||
--- a/kcollectd/misc.cc | ||
+++ b/kcollectd/misc.cc | ||
@@ -119,7 +119,7 @@ | ||
// process avg_data | ||
if (!avg_data.empty()) { | ||
for(std::size_t i=0; i<size; ++i) { | ||
- if (isnan(avg_data[i])) continue; | ||
+ if (std::isnan(avg_data[i])) continue; | ||
valid = true; | ||
if (min > avg_data[i]) min = avg_data[i]; | ||
if (max < avg_data[i]) max = avg_data[i]; | ||
@@ -129,7 +129,7 @@ | ||
// process min/max-data | ||
if (!min_data.empty() && !max_data.empty()) { | ||
for(std::size_t i=0; i<size; ++i) { | ||
- if (isnan(min_data[i]) || isnan(max_data[i])) continue; | ||
+ if (std::isnan(min_data[i]) || std::isnan(max_data[i])) continue; | ||
valid = true; | ||
if (min > min_data[i]) min = min_data[i]; | ||
if (max < min_data[i]) max = min_data[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters