Created attachment 166903 [details] Fix infinite loop in libfpx's EB_Copy_To_Memory() function During a recent exp-run for bug 206074, it was found that graphics/libfpx gives errors with clang 3.8.0: /wrkdirs/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/jpeg/ebuffer.c:94:36: error: variables 'i' and 'num' used in loop condition not modified in loop body [-Werror,-Wfor-loop-analysis] for(i=0,mem_ptr=mem,buf_ptr=buf; i < num ;*mem_ptr++=*buf_ptr++); ^ ~~~ This for loop, in the EB_Copy_To_Memory() function, is non-terminating, since it never increases its counter. The attached patch fixes this. [1] http://package22.nyi.freebsd.org/data/headamd64PR206074-default/2016-02-12_13h52m56s/logs/errors/libfpx-1.3.1.4.log
Comment on attachment 166903 [details] Fix infinite loop in libfpx's EB_Copy_To_Memory() function I'd like to look deeper -- how could this code have ever worked? And, if it was never, actually, exercised, simply remove it altogether, instead of dressing it up...
A commit references this bug: Author: mi Date: Fri Feb 19 03:16:43 UTC 2016 New revision: 409147 URL: https://svnweb.freebsd.org/changeset/ports/409147 Log: Add a patch to get rid of some dead code, which triggers a warning when compiled with clang-3.8. Bump PORTREVISION. PR: 207134 Changes: head/graphics/libfpx/Makefile head/graphics/libfpx/files/patch-ebuffer