Skip to content

InitializeFD: only define "i" if we're going to use it

Alan Coopersmith requested to merge alanc/xscope:clang into master

If we're using closefrom, then we don't use i to loop through the fd's.

Found by clang 13.0.1:

fd.c:91:9: warning: unused variable 'i' [-Wunused-variable]
    int i;
        ^

Fixes: 59ee902e ("Use closefrom() if available") from !12 (merged)
Signed-off-by: Alan Coopersmith

Merge request reports

Loading