summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/general
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2010-11-24 17:24:58 -0500
committerTom Rondeau <trondeau@vt.edu>2010-11-24 17:24:58 -0500
commitd7f501f61362652030ccfcb740dbb03b33f4689e (patch)
tree4cc8441a8666a1ed26b3eb8fb9118c995127809d /gnuradio-core/src/lib/general
parented307f12857545b5c034532e261b6ac2dadcf5fe (diff)
parente5198a304a12410da8936a16900feba2fad1edae (diff)
Merge branch 'warnings'
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r--gnuradio-core/src/lib/general/gr_circular_file.cc7
-rw-r--r--gnuradio-core/src/lib/general/gr_float_to_complex.cc4
2 files changed, 7 insertions, 4 deletions
diff --git a/gnuradio-core/src/lib/general/gr_circular_file.cc b/gnuradio-core/src/lib/general/gr_circular_file.cc
index 468b49a108..c9222597a8 100644
--- a/gnuradio-core/src/lib/general/gr_circular_file.cc
+++ b/gnuradio-core/src/lib/general/gr_circular_file.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002 Free Software Foundation, Inc.
+ * Copyright 2002,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -66,7 +66,10 @@ gr_circular_file::gr_circular_file (const char *filename,
exit (1);
}
#ifdef HAVE_MMAP /* FIXME */
- ftruncate (d_fd, size + HEADER_SIZE);
+ if(ftruncate (d_fd, size + HEADER_SIZE) != 0) {
+ perror (filename);
+ exit (1);
+ }
#endif
}
else {
diff --git a/gnuradio-core/src/lib/general/gr_float_to_complex.cc b/gnuradio-core/src/lib/general/gr_float_to_complex.cc
index 89ef188698..a392abd06e 100644
--- a/gnuradio-core/src/lib/general/gr_float_to_complex.cc
+++ b/gnuradio-core/src/lib/general/gr_float_to_complex.cc
@@ -52,12 +52,12 @@ gr_float_to_complex::work (int noutput_items,
switch (input_items.size ()){
case 1:
- for (int j = 0; j < noutput_items*d_vlen; j++)
+ for (size_t j = 0; j < noutput_items*d_vlen; j++)
out[j] = gr_complex (r[j], 0);
break;
case 2:
- for (int j = 0; j < noutput_items*d_vlen; j++)
+ for (size_t j = 0; j < noutput_items*d_vlen; j++)
out[j] = gr_complex (r[j], i[j]);
break;