You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Further reduce warnings with -Wshadow=compatible-local
In a similar effort tof01592f, here we're targetting fixing thewarnings that -Wshadow=compatible-local produces that we can fix by movinga variable to an inner scope to stop that variable from being shadowed byanother variable declared somewhere later in the function.All of the warnings being fixed here are changing the scope of variableswhich are being used as an iterator for a "for" loop. In each instance,the fix happens to be changing the for loop to use the C99 typeinitialization. Much of this code likely pre-dates our use of C99.Reducing the scope of the outer scoped variable seems like the safest wayto fix these. Renaming seems more likely to risk patches using the wrongvariable. Reducing the scope is more likely to result in a compilationfailure after applying some future patch rather than introducing bugs withit.By my count, this takes the warning count from 129 down to 114.Author: Justin PryzbyDiscussion:https://postgr.es/m/CAApHDvrwLGBP%2BYw9vriayyf%3DXR4uPWP5jr6cQhP9au_kaDUhbA%40mail.gmail.com