Menu

#22 ccguess.c:623: loop wierdness ?

v1.0_(example)
closed-fixed
nobody
None
5
2016-06-30
2016-06-30
dcb
No

ccguess.c:623:7: warning: variable 'i' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]

Source code is

for (i=1; i<256; i++) {
  bytes[i-1] = i;
  i++;
}

Discussion

  • Peter Selinger

    Peter Selinger - 2016-06-30

    This is indeed a bug. The --non-printable option will not work correctly. Thanks for reporting it. It will be fixed in the next release. (The fix is simply to remove the second i++). -- Peter

     
  • Peter Selinger

    Peter Selinger - 2016-06-30
    • status: open --> closed-fixed
     

Log in to post a comment.