[PATCH 00/26] General code tidy up

Colin King colin.king at canonical.com
Sun Oct 14 20:31:52 UTC 2012


From: Colin Ian King <colin.king at canonical.com>

Clean up code, this are fixes to clean up warnings when
building with -Wextra.  Changes include:

1. Ensure correct types are being used
2. Removal of redundant unused parameters in functions
3. Fix signed/unsigned mixed type comparisons
4. Fixup incorrect function comments.

Just a broad tidy-up. I've sanity checked the results
on 32 and 64 bit builds.

Colin Ian King (26):
  lib: fwts_acpid: fix checking of return from read()
  lib: fwts_acpi_method: fix for loop index type
  lib: fwts_dump: fix loop variable type to match table length type
  lib: fwts_framework: Make string length type a size_t rather than an
    int
  lib: fwts_framework: remove redundant parameter from
    fwts_framework_run_test
  lib: fwts_framework: remove redundant fw parameter from
    fwts_framework_show_tests_brief
  lib: fwts_framework: remove fw parameter from
    fwts_framework_test_find
  lib: fwts_framework: remove fw parameter from
    fwts_framework_skip_test_parse
  lib: fwts_battery: remove redundant framework parameter in helper
    functions
  lib: fwts_button: Remove framework parameter from
    fwts_button_match_state_proc
  lib: fwts_button: fix comment on function name
  acpi: acpidump: fix a bunch of int type issues.
  acpi: acpitables: use the correct type for failed
  acpi: mcfg: make mcfg_size a ssize_t
  acpi: wmi: make size a size_t
  bios: bios_info: fix bug where product_serial was not being dumped
  bios: hdaaudio: remove redundant fw parameter from
    hda_audio_check_pins
  bios: dmi_decode: remove redundant parameters from helper functions
  dmi: dmi_decode: failed_count should be uint32_t
  pci: aspm: remove redundant parameter in pcie_check_aspm_registers
  cpu: maxfreq: remove redundant init and deinit functions
  hotkey: remove redundant framework parameter from hotkey_find_keymap
  uefi: csm: use uint32_t for BIOS address ranges
  uefi: uefidump: cast to ptrdiff_t to remove mixed signed/unsigned
    comparison
  acpi: method: fix a bunch of mixed type comparison issues
  lib: fwts_alloc: use ptrdiff_t to ensure non-mixed type comparison

 src/acpi/acpidump/acpidump.c     |   31 +++---
 src/acpi/acpitables/acpitables.c |    2 +-
 src/acpi/mcfg/mcfg.c             |   10 +-
 src/acpi/method/method.c         |  203 ++++++++++++++++++++------------------
 src/acpi/wmi/wmi.c               |   10 +-
 src/bios/bios_info/bios_info.c   |    2 +-
 src/bios/hdaaudio/hdaaudio.c     |   12 +--
 src/cpu/maxfreq/maxfreq.c        |   12 ---
 src/dmi/dmi_decode/dmi_decode.c  |   17 ++--
 src/hotkey/hotkey/hotkey.c       |    4 +-
 src/lib/src/fwts_acpi_method.c   |    4 +-
 src/lib/src/fwts_acpid.c         |    2 +-
 src/lib/src/fwts_alloc.c         |    3 +-
 src/lib/src/fwts_battery.c       |   16 +--
 src/lib/src/fwts_button.c        |    7 +-
 src/lib/src/fwts_dump.c          |    2 +-
 src/lib/src/fwts_framework.c     |   22 ++---
 src/pci/aspm/aspm.c              |    5 +-
 src/uefi/csm/csm.c               |    8 +-
 src/uefi/uefidump/uefidump.c     |    3 +-
 20 files changed, 183 insertions(+), 192 deletions(-)

-- 
1.7.10.4




More information about the fwts-devel mailing list