[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/02: blocks: eliminate signedness warning
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/02: blocks: eliminate signedness warning in max_xx |
Date: |
Tue, 10 Nov 2015 15:37:29 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 6a88efbd7252c9ac3fe66a3830ce668309825fe5
Author: Johnathan Corgan <address@hidden>
Date: Tue Nov 10 07:22:11 2015 -0800
blocks: eliminate signedness warning in max_xx
---
gr-blocks/lib/max_XX_impl.cc.t | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gr-blocks/lib/max_XX_impl.cc.t b/gr-blocks/lib/max_XX_impl.cc.t
index 831877c..36c9726 100644
--- a/gr-blocks/lib/max_XX_impl.cc.t
+++ b/gr-blocks/lib/max_XX_impl.cc.t
@@ -64,7 +64,7 @@ namespace gr {
if(d_vlen_out == 1)
for(int i = 0; i < noutput_items; i++) {
@I_TYPE@ max = ((@I_TYPE@ *)input_items[0])[i*d_vlen];
-
+
for(int j = 0; j < (int)d_vlen; j++ ) {
for(int k = 0; k < ninputs; k++) {
if(((@I_TYPE@ *)input_items[k])[i*d_vlen + j] > max) {
@@ -72,23 +72,23 @@ namespace gr {
}
}
}
-
+
*optr++ = (@O_TYPE@)max;
}
else // vector mode output
- for(int i = 0; i < noutput_items * d_vlen_out; i++) {
+ for(size_t i = 0; i < (size_t)noutput_items * d_vlen_out; i++) {
@I_TYPE@ max = ((@I_TYPE@ *)input_items[0])[i];
-
+
for(int k = 1; k < ninputs; k++) {
if(((@I_TYPE@ *)input_items[k])[i] > max) {
max = ((@address@hidden)input_items[k])[i];
}
}
-
+
*optr++ = (@O_TYPE@)max;
}
-
+
return noutput_items;
}