From 040857a4e80212777103dd1f081c09c1d62c29bc Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 19 Jan 2015 23:28:38 -0500 Subject: [PATCH] Fix unused expression result warnings on OSX. --- conversions.h | 2 +- graph.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conversions.h b/conversions.h index 701f177..ac18bc3 100644 --- a/conversions.h +++ b/conversions.h @@ -27,7 +27,7 @@ enum template inline T convert_unit( T num, int to, int from = BYTES) { - for(from; from < to; from++) + for( ; from < to; from++) { num /= 1024; } diff --git a/graph.cc b/graph.cc index 8491f21..a8694e5 100644 --- a/graph.cc +++ b/graph.cc @@ -28,11 +28,11 @@ std::string get_graph_by_percentage( unsigned value, unsigned len ) unsigned bar_count = ( static_cast(value) / 99.9 * len ); - for( step; step < bar_count; step++ ) + for( ; step < bar_count; step++ ) { bars.append( "|" ); } - for( step; step < len; step++ ) + for( ; step < len; step++ ) { bars.append( " " ); } @@ -48,11 +48,11 @@ std::string get_graph_by_value( unsigned value, unsigned max, unsigned len ) unsigned bar_count = ( static_cast( value / ( max - 0.1 ) ) * len ); - for( step; step < bar_count; step++ ) + for( ; step < bar_count; step++ ) { bars.append( "|" ); } - for( step; step < len; step++ ) + for( ; step < len; step++ ) { bars.append( " " ); }