Sunday, May 27, 2012

Re: [Discuss-gnuradio] gr_vector_map.cc has uninitialized loop index vars (patch attached)

On Sat, May 26, 2012 at 4:23 PM, Porges, Donald
<Donald.Porges@analog.com> wrote:
> Hello list:
>
> The recently added file gr_vector_map.cc has two loops with index variables that are never initialized.  (Surprisingly, g++ -Wall does not catch this form.)  They look like
>
>
>  for (unsigned int i; i < in_vlens.size(); i++) {
>    in_sizeofs.push_back(in_vlens[i]*item_size);
>  }
>
> g++ 4.6.3 (Ubuntu) managed to generate an init of 0 anyway; g++ 4.2.1 (Mac) did not.
>
> I've attached a small patch.

Donald,

Thanks for the patch. I'll be pushing it soon.

Tom

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment