Jim Meyering wrote: > From: Jim Meyering <meyer...@redhat.com> > > Following up on discussion here, > > http://marc.info/?t=133759487600008&r=1&w=2 > > here are patches to limit the scope of the remaining global variables. > Most changes simply added a preceding "static". However, in some cases, > I've made minor additional changes, e.g., to make a static > table "const" as well (which sometimes required making an iterator > pointer const, too), and to move or remove declarations of variables > that the compiler then was able to identify as unused. > > Initially I put the changes to each file in a separate commit, but that > got old quickly, and I lumped all of the remaining changes into the > 9th commit. If that's a problem, let me know and I'll separate it. > > > Jim Meyering (9): > ccid: declare DEFAULT_ATR table to be "static const" > tcg: declare __jit_debug_descriptor to be static > alpha-dis: remove unused global; declare others to be static > linux-user: arg_table need not have global scope > ccid: make backend_enum_table "static const" and adjust users > sheepdog: declare bdrv_sheepdog to be static > mips-dis: declare four globals to be "static" > bonito: declare bonito_state to be static > convert many more globals to static > > alpha-dis.c | 26 ++++++---------- > arm-dis.c | 8 ++--- > block/sheepdog.c | 2 +- > cpus.c | 4 +-- > cris-dis.c | 2 +- > hw/9pfs/virtio-9p-synth.c | 2 +- > hw/bonito.c | 2 +- > hw/ccid-card-emulated.c | 6 ++-- > hw/ccid-card-passthru.c | 2 +- > hw/ide/pci.c | 2 +- > hw/leon3.c | 2 +- > hw/mips_fulong2e.c | 2 +- > hw/s390-virtio-bus.c | 2 +- > hw/spapr_rtas.c | 2 +- > hw/xen_platform.c | 2 +- > hw/xgmac.c | 2 +- > linux-user/main.c | 6 ++-- > m68k-dis.c | 79 > ++++++++++++++++++++++++----------------------- > memory.c | 2 +- > microblaze-dis.c | 6 ++-- > mips-dis.c | 15 +++++---- > ppc-dis.c | 26 ++++++++-------- > sh4-dis.c | 2 +- > target-cris/translate.c | 2 +- > target-i386/cpu.c | 4 +-- > target-i386/kvm.c | 2 +- > tcg/tcg.c | 2 +- > tests/fdc-test.c | 2 +- > vl.c | 12 ++++--- > 29 files changed, 110 insertions(+), 118 deletions(-)
I've just rebased my local branch with these patches and see that they are still pending. Let me know if you're interested.