Fixing signed vs unsigned comparison

We were always going through the for() loop here with int i=0 .. i <
datastruct.size() where .size() is size_t. This commit removes the
warnings.