Patchwork [1/2] tests: use FWTS_UNUSED on unused func args

login
register
mail settings
Submitter Colin King
Date Oct. 25, 2012, 1:22 p.m.
Message ID <1351171352-29606-2-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/194151/
State Accepted
Headers show

Comments

Colin King - Oct. 25, 2012, 1:22 p.m.
From: Colin Ian King <colin.king@canonical.com>

Now use FWTS_UNUSED() on all the relevant code in the fwts tests

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/acpidump/acpidump.c       |    2 +
 src/acpi/acpiinfo/acpiinfo.c       |    6 +++
 src/acpi/acpitables/acpitables.c   |    3 ++
 src/acpi/brightness/brightness.c   |    2 +
 src/acpi/common/common.c           |    2 +
 src/acpi/dmar/dmar.c               |    5 +++
 src/acpi/klog/klog.c               |    2 +
 src/acpi/mcfg/mcfg.c               |    2 +
 src/acpi/method/method.c           |   86 ++++++++++++++++++++++++++++++++++++
 src/acpi/s3/s3.c                   |    6 +++
 src/acpi/s3power/s3power.c         |    6 +++
 src/acpi/s4/s4.c                   |    5 +++
 src/acpi/syntaxcheck/syntaxcheck.c |    2 +
 src/bios/ebda_region/ebda_region.c |    2 +
 src/bios/mtrr/mtrr.c               |    2 +
 src/bios/multiproc/mpcheck.c       |    2 +
 src/bios/multiproc/mpdump.c        |    2 +
 src/bios/os2gap/os2gap.c           |    2 +
 src/cpu/msr/msr.c                  |    2 +
 src/cpu/virt/virt.c                |    2 +
 src/hotkey/hotkey/hotkey.c         |    2 +
 src/hpet/hpet_check/hpet_check.c   |    2 +
 src/kernel/oops/oops.c             |    2 +
 src/pci/maxreadreq/maxreadreq.c    |    2 +
 src/uefi/uefirttime/uefirttime.c   |    1 +
 25 files changed, 152 insertions(+)
Alex Hung - Oct. 29, 2012, 6:47 a.m.
On 10/25/2012 09:22 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Now use FWTS_UNUSED() on all the relevant code in the fwts tests
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/acpidump/acpidump.c       |    2 +
>   src/acpi/acpiinfo/acpiinfo.c       |    6 +++
>   src/acpi/acpitables/acpitables.c   |    3 ++
>   src/acpi/brightness/brightness.c   |    2 +
>   src/acpi/common/common.c           |    2 +
>   src/acpi/dmar/dmar.c               |    5 +++
>   src/acpi/klog/klog.c               |    2 +
>   src/acpi/mcfg/mcfg.c               |    2 +
>   src/acpi/method/method.c           |   86 ++++++++++++++++++++++++++++++++++++
>   src/acpi/s3/s3.c                   |    6 +++
>   src/acpi/s3power/s3power.c         |    6 +++
>   src/acpi/s4/s4.c                   |    5 +++
>   src/acpi/syntaxcheck/syntaxcheck.c |    2 +
>   src/bios/ebda_region/ebda_region.c |    2 +
>   src/bios/mtrr/mtrr.c               |    2 +
>   src/bios/multiproc/mpcheck.c       |    2 +
>   src/bios/multiproc/mpdump.c        |    2 +
>   src/bios/os2gap/os2gap.c           |    2 +
>   src/cpu/msr/msr.c                  |    2 +
>   src/cpu/virt/virt.c                |    2 +
>   src/hotkey/hotkey/hotkey.c         |    2 +
>   src/hpet/hpet_check/hpet_check.c   |    2 +
>   src/kernel/oops/oops.c             |    2 +
>   src/pci/maxreadreq/maxreadreq.c    |    2 +
>   src/uefi/uefirttime/uefirttime.c   |    1 +
>   25 files changed, 152 insertions(+)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index d6b4333..d6b899d 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -303,6 +303,8 @@ static void acpi_dump_gas(fwts_framework *fw, fwts_acpidump_field *info, void *d
>   		FIELD_END
>   	};
>
> +	FWTS_UNUSED(offset);
> +
>   	fwts_log_nl(fw);
>   	fwts_log_info_verbatum(fw, "%s (Generic Address Structure)",
>   		acpi_dump_field_info(info->label, info->size, info->offset));
> diff --git a/src/acpi/acpiinfo/acpiinfo.c b/src/acpi/acpiinfo/acpiinfo.c
> index c72ba20..d6d3904 100644
> --- a/src/acpi/acpiinfo/acpiinfo.c
> +++ b/src/acpi/acpiinfo/acpiinfo.c
> @@ -33,6 +33,10 @@
>   static void acpiinfo_check(fwts_framework *fw, char *line,
>   	int repeated, char *prevline, void *private, int *errors)
>   {
> +	FWTS_UNUSED(repeated);
> +	FWTS_UNUSED(private);
> +	FWTS_UNUSED(errors);
> +
>   	if (strstr(line, "ACPI: Subsystem revision") != NULL) {
>   		char *version = strstr(line, "sion ");
>   		if (version) {
> @@ -208,6 +212,8 @@ static int acpiinfo_init(fwts_framework *fw)
>
>   static int acpiinfo_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
> index 8cdcc31..d12b1a8 100644
> --- a/src/acpi/acpitables/acpitables.c
> +++ b/src/acpi/acpitables/acpitables.c
> @@ -462,6 +462,9 @@ static void acpi_table_check_madt(fwts_framework *fw, fwts_acpi_table_info *tabl
>
>   static void acpi_table_check_mcfg(fwts_framework *fw, fwts_acpi_table_info *table)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(table);
> +
>   	/* FIXME */
>   	/*fwts_acpi_table_mcfg *mcfg = (fwts_acpi_table_mcfg*)table->data;*/
>   }
> diff --git a/src/acpi/brightness/brightness.c b/src/acpi/brightness/brightness.c
> index f85a06a..374fcfd 100644
> --- a/src/acpi/brightness/brightness.c
> +++ b/src/acpi/brightness/brightness.c
> @@ -47,6 +47,8 @@ static int brightness_init(fwts_framework *fw)
>
>   static int brightness_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (brightnessdir)
>   		closedir(brightnessdir);
>
> diff --git a/src/acpi/common/common.c b/src/acpi/common/common.c
> index ef89314..b4d7c57 100644
> --- a/src/acpi/common/common.c
> +++ b/src/acpi/common/common.c
> @@ -48,6 +48,8 @@ static int dmesg_common_init(fwts_framework *fw)
>
>   static int dmesg_common_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
> index 3200a56..ba1b0ee 100644
> --- a/src/acpi/dmar/dmar.c
> +++ b/src/acpi/dmar/dmar.c
> @@ -293,6 +293,11 @@ static int dmar_acpi_table_check(fwts_framework *fw)
>   static void acpiinfo_check(fwts_framework *fw,
>   	char *line, int repeated, char *prevline, void *private, int *errors)
>   {
> +	FWTS_UNUSED(repeated);
> +	FWTS_UNUSED(prevline);
> +	FWTS_UNUSED(private);
> +	FWTS_UNUSED(errors);
> +
>           if (strstr(line, "DMAR:[fault reason"))
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "DMARError",
>   		"Found DMAR error: %s", line);
> diff --git a/src/acpi/klog/klog.c b/src/acpi/klog/klog.c
> index 488d9fb..ea79047 100644
> --- a/src/acpi/klog/klog.c
> +++ b/src/acpi/klog/klog.c
> @@ -42,6 +42,8 @@ static int klog_init(fwts_framework *fw)
>
>   static int klog_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/acpi/mcfg/mcfg.c b/src/acpi/mcfg/mcfg.c
> index 9dfd9fd..962250a 100644
> --- a/src/acpi/mcfg/mcfg.c
> +++ b/src/acpi/mcfg/mcfg.c
> @@ -111,6 +111,8 @@ static int mcfg_init(fwts_framework *fw)
>
>   static int mcfg_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (memory_map_list)
>   		fwts_memory_map_table_free(memory_map_list);
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 2c4d390..fd57015 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -524,6 +524,8 @@ static void method_test_buffer_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) == FWTS_OK)
>   		fwts_passed(fw, "%s correctly returned a buffer of %" PRIu32 " elements.",
>   			name, obj->Buffer.Length);
> @@ -540,6 +542,9 @@ static void method_test_integer_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
>   		fwts_passed(fw, "%s correctly returned an integer.", name);
>   }
> @@ -555,6 +560,9 @@ static void method_test_string_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_STRING) == FWTS_OK)
>   		fwts_passed(fw, "%s correctly returned a string.", name);
>   }
> @@ -570,6 +578,8 @@ static void method_test_NULL_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (buf->Length && buf->Pointer) {
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodShouldReturnNothing", "%s returned values, but was expected to return nothing.", name);
>   		fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN);
> @@ -728,6 +738,9 @@ static void method_test_HID_return(
>   {
>   	char tmp[8];
>
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(private);
> +
>   	if (obj == NULL) {
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
>   			"Method %s returned a NULL object, and did not "
> @@ -807,6 +820,8 @@ static void method_test_PLD_return(
>   {
>   	uint32_t i;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -836,6 +851,9 @@ static void method_test_SUB_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(private);
> +
>   	if (obj == NULL) {
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
>   			"Method %s returned a NULL object, and did not "
> @@ -889,6 +907,9 @@ static void method_test_UID_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(private);
> +
>   	if (obj == NULL){
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
>   			"Method %s returned a NULL object, and did not "
> @@ -973,6 +994,8 @@ static void method_test_EDL_return(
>   {
>   	uint32_t i;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1044,6 +1067,8 @@ static void method_test_STA_return(
>   {
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if ((obj->Integer.Value & 3) == 2) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -1112,6 +1137,8 @@ static void method_test_SEG_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if ((obj->Integer.Value & 0xffff0000)) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -1206,6 +1233,8 @@ static void method_test_power_resources_return(
>   {
>   	uint32_t i;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1288,6 +1317,8 @@ static void method_test_Sx__return(
>   {
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1451,6 +1482,8 @@ static void method_test_CPC_return(
>   {
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1504,6 +1537,8 @@ static void method_test_CSD_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1629,6 +1664,8 @@ static void method_test_PCT_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1681,6 +1718,8 @@ static void method_test_PSS_return(
>   	uint32_t prev_power = 0;
>   	bool max_freq_valid = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1852,6 +1891,8 @@ static void method_test_TSD_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1978,6 +2019,8 @@ static void method_test_TSS_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -2105,6 +2148,8 @@ static void method_test_LID_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
>   		fwts_passed(fw,
>   			"_LID correctly returned sane looking value 0x%8.8" PRIx64,
> @@ -2128,6 +2173,8 @@ static void method_test_GCP_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if (obj->Integer.Value & ~0xf) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -2158,6 +2205,8 @@ static void method_test_GRT_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) != FWTS_OK)
>   		return;
>
> @@ -2190,6 +2239,8 @@ static void method_test_GWS_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if (obj->Integer.Value & ~0x3) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -2285,6 +2336,8 @@ static void method_test_SBS_return(
>   		"Maximum 4 Smart Batteries, system manager/selector present"
>   	};
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		switch (obj->Integer.Value) {
>   		case 0 ... 4:
> @@ -2339,6 +2392,8 @@ static void method_test_BIF_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2484,6 +2539,8 @@ static void method_test_BIX_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2658,6 +2715,8 @@ static void method_test_BST_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2751,6 +2810,12 @@ static void method_test_PCL_return(fwts_framework *fw,
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(name);
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	/* FIXME */
>   }
>
> @@ -2784,6 +2849,8 @@ static void method_test_BMD_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2848,6 +2915,8 @@ static void method_test_PSR_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if (obj->Integer.Value > 2) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -2876,6 +2945,8 @@ static void method_test_PIF_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		fwts_method_dump_object(fw, obj);
>
> @@ -2924,6 +2995,8 @@ static void method_test_FIF_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		fwts_method_dump_object(fw, obj);
>
> @@ -2983,6 +3056,8 @@ static void method_test_FST_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		fwts_method_dump_object(fw, obj);
>
> @@ -3200,6 +3275,8 @@ static void method_test_RTV_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
>   		fwts_passed(fw,
>   			"_RTV correctly returned sane looking value 0x%8.8" PRIx64,
> @@ -3464,6 +3541,8 @@ static void method_test_DOD_return(
>   		"Reserved"
>   	};
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>
> @@ -3514,6 +3593,9 @@ static void method_test_ROM_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	method_check_type(fw, name, buf, ACPI_TYPE_BUFFER);
>   }
>
> @@ -3571,6 +3653,8 @@ static void method_test_BCL_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -3691,6 +3775,8 @@ static void method_test_DDC_return(
>   {
>   	uint32_t requested = *(uint32_t*)private;
>
> +	FWTS_UNUSED(buf);
> +
>   	if (obj == NULL){
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM,
>   			"MethodReturnNullObj",
> diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
> index ece6799..326f639 100644
> --- a/src/acpi/s3/s3.c
> +++ b/src/acpi/s3/s3.c
> @@ -301,6 +301,8 @@ static int s3_test_multiple(fwts_framework *fw)
>
>   static int s3_options_check(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if ((s3_multiple < 0) || (s3_multiple > 100000)) {
>   		fprintf(stderr, "--s3-multiple is %d, it should be 1..100000\n", s3_multiple);
>   		return FWTS_ERROR;
> @@ -334,6 +336,10 @@ static int s3_options_check(fwts_framework *fw)
>
>   static int s3_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(argc);
> +	FWTS_UNUSED(argv);
> +
>           switch (option_char) {
>           case 0:
>                   switch (long_index) {
> diff --git a/src/acpi/s3power/s3power.c b/src/acpi/s3power/s3power.c
> index a57bcba..a8a7c25 100644
> --- a/src/acpi/s3power/s3power.c
> +++ b/src/acpi/s3power/s3power.c
> @@ -238,6 +238,8 @@ static int s3power_test(fwts_framework *fw)
>
>   static int s3power_options_check(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if ((s3power_sleep_delay < 600) || (s3power_sleep_delay > 24*60*60)) {
>   		fprintf(stderr, "--s3power-sleep-delay is %d, it cannot be less than 600 seconds or more than 24 hours!\n", s3power_sleep_delay);
>   		return FWTS_ERROR;
> @@ -247,6 +249,10 @@ static int s3power_options_check(fwts_framework *fw)
>
>   static int s3power_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(argc);
> +	FWTS_UNUSED(argv);
> +
>           switch (option_char) {
>           case 0:
>                   switch (long_index) {
> diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
> index 23f8790..2d0f548 100644
> --- a/src/acpi/s4/s4.c
> +++ b/src/acpi/s4/s4.c
> @@ -364,6 +364,8 @@ static int s4_test_multiple(fwts_framework *fw)
>
>   static int s4_options_check(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if ((s4_multiple < 0) || (s4_multiple > 100000)) {
>   		fprintf(stderr, "--s4-multiple is %d, it should be 1..100000\n", s4_multiple);
>   		return FWTS_ERROR;
> @@ -397,6 +399,9 @@ static int s4_options_check(fwts_framework *fw)
>
>   static int s4_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(argc);
> +	FWTS_UNUSED(argv);
>
>           switch (option_char) {
>           case 0:
> diff --git a/src/acpi/syntaxcheck/syntaxcheck.c b/src/acpi/syntaxcheck/syntaxcheck.c
> index 5ae7411..ad9efcc 100644
> --- a/src/acpi/syntaxcheck/syntaxcheck.c
> +++ b/src/acpi/syntaxcheck/syntaxcheck.c
> @@ -58,6 +58,8 @@ static int syntaxcheck_init(fwts_framework *fw)
>
>   static int syntaxcheck_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	syntaxcheck_free_advice();
>
>   	return FWTS_OK;
> diff --git a/src/bios/ebda_region/ebda_region.c b/src/bios/ebda_region/ebda_region.c
> index cf74e05..8f52a01 100644
> --- a/src/bios/ebda_region/ebda_region.c
> +++ b/src/bios/ebda_region/ebda_region.c
> @@ -58,6 +58,8 @@ static int ebda_init(fwts_framework *fw)
>
>   static int ebda_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(memory_map);
>
>   	return FWTS_OK;
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index d66ea80..5f3e8d5 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -549,6 +549,8 @@ static int mtrr_init(fwts_framework *fw)
>
>   static int mtrr_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>   	fwts_list_free(mtrr_list, free);
>   	if (fwts_cpuinfo)
> diff --git a/src/bios/multiproc/mpcheck.c b/src/bios/multiproc/mpcheck.c
> index 790218a..4efe23a 100644
> --- a/src/bios/multiproc/mpcheck.c
> +++ b/src/bios/multiproc/mpcheck.c
> @@ -523,6 +523,8 @@ static int mpcheck_init(fwts_framework *fw)
>
>   static int mpcheck_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	return fwts_mp_data_free(&mp_data);
>   }
>
> diff --git a/src/bios/multiproc/mpdump.c b/src/bios/multiproc/mpdump.c
> index ce3fa68..1bb8e07 100644
> --- a/src/bios/multiproc/mpdump.c
> +++ b/src/bios/multiproc/mpdump.c
> @@ -226,6 +226,8 @@ static int mpdump_init(fwts_framework *fw)
>
>   static int mpdump_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	return fwts_mp_data_free(&mp_data);
>   }
>
> diff --git a/src/bios/os2gap/os2gap.c b/src/bios/os2gap/os2gap.c
> index b1e51d0..7c29353 100644
> --- a/src/bios/os2gap/os2gap.c
> +++ b/src/bios/os2gap/os2gap.c
> @@ -40,6 +40,8 @@ static int os2gap_init(fwts_framework *fw)
>
>   static int os2gap_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (os2gap_memory_map_info)
>   		fwts_memory_map_table_free(os2gap_memory_map_info);
>
> diff --git a/src/cpu/msr/msr.c b/src/cpu/msr/msr.c
> index 0b3f6b0..d5532ca 100644
> --- a/src/cpu/msr/msr.c
> +++ b/src/cpu/msr/msr.c
> @@ -70,6 +70,8 @@ static int msr_init(fwts_framework *fw)
>
>   static int msr_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_cpu_free_info(cpuinfo);
>
>   	return FWTS_OK;
> diff --git a/src/cpu/virt/virt.c b/src/cpu/virt/virt.c
> index c63f064..0367c6a 100644
> --- a/src/cpu/virt/virt.c
> +++ b/src/cpu/virt/virt.c
> @@ -52,6 +52,8 @@ static int virt_init(fwts_framework *fw)
>
>   static int virt_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (fwts_virt_cpuinfo)
>   		fwts_cpu_free_info(fwts_virt_cpuinfo);
>
> diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
> index 53b9208..267b69e 100644
> --- a/src/hotkey/hotkey/hotkey.c
> +++ b/src/hotkey/hotkey/hotkey.c
> @@ -224,6 +224,8 @@ static int hotkey_init(fwts_framework *fw)
>
>   static int hotkey_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_keymap_free(hotkeys);
>   	if (hotkey_dev)
>   		free(hotkey_dev);
> diff --git a/src/hpet/hpet_check/hpet_check.c b/src/hpet/hpet_check/hpet_check.c
> index acde5f4..399bde2 100644
> --- a/src/hpet/hpet_check/hpet_check.c
> +++ b/src/hpet/hpet_check/hpet_check.c
> @@ -156,6 +156,8 @@ static int hpet_check_init(fwts_framework *fw)
>
>   static int hpet_check_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (klog)
>   		fwts_text_list_free(klog);
>
> diff --git a/src/kernel/oops/oops.c b/src/kernel/oops/oops.c
> index 5e16ce9..33ae5ae 100644
> --- a/src/kernel/oops/oops.c
> +++ b/src/kernel/oops/oops.c
> @@ -42,6 +42,8 @@ static int oops_init(fwts_framework *fw)
>
>   static int oops_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/pci/maxreadreq/maxreadreq.c b/src/pci/maxreadreq/maxreadreq.c
> index cdf82ce..a570b37 100644
> --- a/src/pci/maxreadreq/maxreadreq.c
> +++ b/src/pci/maxreadreq/maxreadreq.c
> @@ -55,6 +55,8 @@ static int maxreadreq_init(fwts_framework *fw)
>
>   static int maxreadreq_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (lspci_text)
>   		fwts_text_list_free(lspci_text);
>
> diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
> index 686cf2d..319ac76 100644
> --- a/src/uefi/uefirttime/uefirttime.c
> +++ b/src/uefi/uefirttime/uefirttime.c
> @@ -160,6 +160,7 @@ static int uefirttime_init(fwts_framework *fw)
>
>   static int uefirttime_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
>
>   	close(fd);
>
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu - Oct. 31, 2012, 11:21 a.m.
On 10/25/2012 09:22 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Now use FWTS_UNUSED() on all the relevant code in the fwts tests
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/acpidump/acpidump.c       |    2 +
>   src/acpi/acpiinfo/acpiinfo.c       |    6 +++
>   src/acpi/acpitables/acpitables.c   |    3 ++
>   src/acpi/brightness/brightness.c   |    2 +
>   src/acpi/common/common.c           |    2 +
>   src/acpi/dmar/dmar.c               |    5 +++
>   src/acpi/klog/klog.c               |    2 +
>   src/acpi/mcfg/mcfg.c               |    2 +
>   src/acpi/method/method.c           |   86 ++++++++++++++++++++++++++++++++++++
>   src/acpi/s3/s3.c                   |    6 +++
>   src/acpi/s3power/s3power.c         |    6 +++
>   src/acpi/s4/s4.c                   |    5 +++
>   src/acpi/syntaxcheck/syntaxcheck.c |    2 +
>   src/bios/ebda_region/ebda_region.c |    2 +
>   src/bios/mtrr/mtrr.c               |    2 +
>   src/bios/multiproc/mpcheck.c       |    2 +
>   src/bios/multiproc/mpdump.c        |    2 +
>   src/bios/os2gap/os2gap.c           |    2 +
>   src/cpu/msr/msr.c                  |    2 +
>   src/cpu/virt/virt.c                |    2 +
>   src/hotkey/hotkey/hotkey.c         |    2 +
>   src/hpet/hpet_check/hpet_check.c   |    2 +
>   src/kernel/oops/oops.c             |    2 +
>   src/pci/maxreadreq/maxreadreq.c    |    2 +
>   src/uefi/uefirttime/uefirttime.c   |    1 +
>   25 files changed, 152 insertions(+)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index d6b4333..d6b899d 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -303,6 +303,8 @@ static void acpi_dump_gas(fwts_framework *fw, fwts_acpidump_field *info, void *d
>   		FIELD_END
>   	};
>
> +	FWTS_UNUSED(offset);
> +
>   	fwts_log_nl(fw);
>   	fwts_log_info_verbatum(fw, "%s (Generic Address Structure)",
>   		acpi_dump_field_info(info->label, info->size, info->offset));
> diff --git a/src/acpi/acpiinfo/acpiinfo.c b/src/acpi/acpiinfo/acpiinfo.c
> index c72ba20..d6d3904 100644
> --- a/src/acpi/acpiinfo/acpiinfo.c
> +++ b/src/acpi/acpiinfo/acpiinfo.c
> @@ -33,6 +33,10 @@
>   static void acpiinfo_check(fwts_framework *fw, char *line,
>   	int repeated, char *prevline, void *private, int *errors)
>   {
> +	FWTS_UNUSED(repeated);
> +	FWTS_UNUSED(private);
> +	FWTS_UNUSED(errors);
> +
>   	if (strstr(line, "ACPI: Subsystem revision") != NULL) {
>   		char *version = strstr(line, "sion ");
>   		if (version) {
> @@ -208,6 +212,8 @@ static int acpiinfo_init(fwts_framework *fw)
>
>   static int acpiinfo_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
> index 8cdcc31..d12b1a8 100644
> --- a/src/acpi/acpitables/acpitables.c
> +++ b/src/acpi/acpitables/acpitables.c
> @@ -462,6 +462,9 @@ static void acpi_table_check_madt(fwts_framework *fw, fwts_acpi_table_info *tabl
>
>   static void acpi_table_check_mcfg(fwts_framework *fw, fwts_acpi_table_info *table)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(table);
> +
>   	/* FIXME */
>   	/*fwts_acpi_table_mcfg *mcfg = (fwts_acpi_table_mcfg*)table->data;*/
>   }
> diff --git a/src/acpi/brightness/brightness.c b/src/acpi/brightness/brightness.c
> index f85a06a..374fcfd 100644
> --- a/src/acpi/brightness/brightness.c
> +++ b/src/acpi/brightness/brightness.c
> @@ -47,6 +47,8 @@ static int brightness_init(fwts_framework *fw)
>
>   static int brightness_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (brightnessdir)
>   		closedir(brightnessdir);
>
> diff --git a/src/acpi/common/common.c b/src/acpi/common/common.c
> index ef89314..b4d7c57 100644
> --- a/src/acpi/common/common.c
> +++ b/src/acpi/common/common.c
> @@ -48,6 +48,8 @@ static int dmesg_common_init(fwts_framework *fw)
>
>   static int dmesg_common_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
> index 3200a56..ba1b0ee 100644
> --- a/src/acpi/dmar/dmar.c
> +++ b/src/acpi/dmar/dmar.c
> @@ -293,6 +293,11 @@ static int dmar_acpi_table_check(fwts_framework *fw)
>   static void acpiinfo_check(fwts_framework *fw,
>   	char *line, int repeated, char *prevline, void *private, int *errors)
>   {
> +	FWTS_UNUSED(repeated);
> +	FWTS_UNUSED(prevline);
> +	FWTS_UNUSED(private);
> +	FWTS_UNUSED(errors);
> +
>           if (strstr(line, "DMAR:[fault reason"))
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "DMARError",
>   		"Found DMAR error: %s", line);
> diff --git a/src/acpi/klog/klog.c b/src/acpi/klog/klog.c
> index 488d9fb..ea79047 100644
> --- a/src/acpi/klog/klog.c
> +++ b/src/acpi/klog/klog.c
> @@ -42,6 +42,8 @@ static int klog_init(fwts_framework *fw)
>
>   static int klog_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/acpi/mcfg/mcfg.c b/src/acpi/mcfg/mcfg.c
> index 9dfd9fd..962250a 100644
> --- a/src/acpi/mcfg/mcfg.c
> +++ b/src/acpi/mcfg/mcfg.c
> @@ -111,6 +111,8 @@ static int mcfg_init(fwts_framework *fw)
>
>   static int mcfg_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (memory_map_list)
>   		fwts_memory_map_table_free(memory_map_list);
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 2c4d390..fd57015 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -524,6 +524,8 @@ static void method_test_buffer_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) == FWTS_OK)
>   		fwts_passed(fw, "%s correctly returned a buffer of %" PRIu32 " elements.",
>   			name, obj->Buffer.Length);
> @@ -540,6 +542,9 @@ static void method_test_integer_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
>   		fwts_passed(fw, "%s correctly returned an integer.", name);
>   }
> @@ -555,6 +560,9 @@ static void method_test_string_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_STRING) == FWTS_OK)
>   		fwts_passed(fw, "%s correctly returned a string.", name);
>   }
> @@ -570,6 +578,8 @@ static void method_test_NULL_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (buf->Length && buf->Pointer) {
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodShouldReturnNothing", "%s returned values, but was expected to return nothing.", name);
>   		fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN);
> @@ -728,6 +738,9 @@ static void method_test_HID_return(
>   {
>   	char tmp[8];
>
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(private);
> +
>   	if (obj == NULL) {
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
>   			"Method %s returned a NULL object, and did not "
> @@ -807,6 +820,8 @@ static void method_test_PLD_return(
>   {
>   	uint32_t i;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -836,6 +851,9 @@ static void method_test_SUB_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(private);
> +
>   	if (obj == NULL) {
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
>   			"Method %s returned a NULL object, and did not "
> @@ -889,6 +907,9 @@ static void method_test_UID_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(private);
> +
>   	if (obj == NULL){
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
>   			"Method %s returned a NULL object, and did not "
> @@ -973,6 +994,8 @@ static void method_test_EDL_return(
>   {
>   	uint32_t i;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1044,6 +1067,8 @@ static void method_test_STA_return(
>   {
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if ((obj->Integer.Value & 3) == 2) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -1112,6 +1137,8 @@ static void method_test_SEG_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if ((obj->Integer.Value & 0xffff0000)) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -1206,6 +1233,8 @@ static void method_test_power_resources_return(
>   {
>   	uint32_t i;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1288,6 +1317,8 @@ static void method_test_Sx__return(
>   {
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1451,6 +1482,8 @@ static void method_test_CPC_return(
>   {
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1504,6 +1537,8 @@ static void method_test_CSD_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1629,6 +1664,8 @@ static void method_test_PCT_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1681,6 +1718,8 @@ static void method_test_PSS_return(
>   	uint32_t prev_power = 0;
>   	bool max_freq_valid = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1852,6 +1891,8 @@ static void method_test_TSD_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -1978,6 +2019,8 @@ static void method_test_TSS_return(
>   	uint32_t i;
>   	bool failed = false;
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
>   		return;
>
> @@ -2105,6 +2148,8 @@ static void method_test_LID_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
>   		fwts_passed(fw,
>   			"_LID correctly returned sane looking value 0x%8.8" PRIx64,
> @@ -2128,6 +2173,8 @@ static void method_test_GCP_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if (obj->Integer.Value & ~0xf) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -2158,6 +2205,8 @@ static void method_test_GRT_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) != FWTS_OK)
>   		return;
>
> @@ -2190,6 +2239,8 @@ static void method_test_GWS_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if (obj->Integer.Value & ~0x3) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -2285,6 +2336,8 @@ static void method_test_SBS_return(
>   		"Maximum 4 Smart Batteries, system manager/selector present"
>   	};
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		switch (obj->Integer.Value) {
>   		case 0 ... 4:
> @@ -2339,6 +2392,8 @@ static void method_test_BIF_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2484,6 +2539,8 @@ static void method_test_BIX_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2658,6 +2715,8 @@ static void method_test_BST_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2751,6 +2810,12 @@ static void method_test_PCL_return(fwts_framework *fw,
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(name);
> +	FWTS_UNUSED(buf);
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	/* FIXME */
>   }
>
> @@ -2784,6 +2849,8 @@ static void method_test_BMD_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -2848,6 +2915,8 @@ static void method_test_PSR_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
>   		if (obj->Integer.Value > 2) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> @@ -2876,6 +2945,8 @@ static void method_test_PIF_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		fwts_method_dump_object(fw, obj);
>
> @@ -2924,6 +2995,8 @@ static void method_test_FIF_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		fwts_method_dump_object(fw, obj);
>
> @@ -2983,6 +3056,8 @@ static void method_test_FST_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		fwts_method_dump_object(fw, obj);
>
> @@ -3200,6 +3275,8 @@ static void method_test_RTV_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
>   		fwts_passed(fw,
>   			"_RTV correctly returned sane looking value 0x%8.8" PRIx64,
> @@ -3464,6 +3541,8 @@ static void method_test_DOD_return(
>   		"Reserved"
>   	};
>
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>
> @@ -3514,6 +3593,9 @@ static void method_test_ROM_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(obj);
> +	FWTS_UNUSED(private);
> +
>   	method_check_type(fw, name, buf, ACPI_TYPE_BUFFER);
>   }
>
> @@ -3571,6 +3653,8 @@ static void method_test_BCL_return(
>   	ACPI_OBJECT *obj,
>   	void *private)
>   {
> +	FWTS_UNUSED(private);
> +
>   	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
>   		uint32_t i;
>   		int failed = 0;
> @@ -3691,6 +3775,8 @@ static void method_test_DDC_return(
>   {
>   	uint32_t requested = *(uint32_t*)private;
>
> +	FWTS_UNUSED(buf);
> +
>   	if (obj == NULL){
>   		fwts_failed(fw, LOG_LEVEL_MEDIUM,
>   			"MethodReturnNullObj",
> diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
> index ece6799..326f639 100644
> --- a/src/acpi/s3/s3.c
> +++ b/src/acpi/s3/s3.c
> @@ -301,6 +301,8 @@ static int s3_test_multiple(fwts_framework *fw)
>
>   static int s3_options_check(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if ((s3_multiple < 0) || (s3_multiple > 100000)) {
>   		fprintf(stderr, "--s3-multiple is %d, it should be 1..100000\n", s3_multiple);
>   		return FWTS_ERROR;
> @@ -334,6 +336,10 @@ static int s3_options_check(fwts_framework *fw)
>
>   static int s3_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(argc);
> +	FWTS_UNUSED(argv);
> +
>           switch (option_char) {
>           case 0:
>                   switch (long_index) {
> diff --git a/src/acpi/s3power/s3power.c b/src/acpi/s3power/s3power.c
> index a57bcba..a8a7c25 100644
> --- a/src/acpi/s3power/s3power.c
> +++ b/src/acpi/s3power/s3power.c
> @@ -238,6 +238,8 @@ static int s3power_test(fwts_framework *fw)
>
>   static int s3power_options_check(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if ((s3power_sleep_delay < 600) || (s3power_sleep_delay > 24*60*60)) {
>   		fprintf(stderr, "--s3power-sleep-delay is %d, it cannot be less than 600 seconds or more than 24 hours!\n", s3power_sleep_delay);
>   		return FWTS_ERROR;
> @@ -247,6 +249,10 @@ static int s3power_options_check(fwts_framework *fw)
>
>   static int s3power_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(argc);
> +	FWTS_UNUSED(argv);
> +
>           switch (option_char) {
>           case 0:
>                   switch (long_index) {
> diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
> index 23f8790..2d0f548 100644
> --- a/src/acpi/s4/s4.c
> +++ b/src/acpi/s4/s4.c
> @@ -364,6 +364,8 @@ static int s4_test_multiple(fwts_framework *fw)
>
>   static int s4_options_check(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if ((s4_multiple < 0) || (s4_multiple > 100000)) {
>   		fprintf(stderr, "--s4-multiple is %d, it should be 1..100000\n", s4_multiple);
>   		return FWTS_ERROR;
> @@ -397,6 +399,9 @@ static int s4_options_check(fwts_framework *fw)
>
>   static int s4_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
>   {
> +	FWTS_UNUSED(fw);
> +	FWTS_UNUSED(argc);
> +	FWTS_UNUSED(argv);
>
>           switch (option_char) {
>           case 0:
> diff --git a/src/acpi/syntaxcheck/syntaxcheck.c b/src/acpi/syntaxcheck/syntaxcheck.c
> index 5ae7411..ad9efcc 100644
> --- a/src/acpi/syntaxcheck/syntaxcheck.c
> +++ b/src/acpi/syntaxcheck/syntaxcheck.c
> @@ -58,6 +58,8 @@ static int syntaxcheck_init(fwts_framework *fw)
>
>   static int syntaxcheck_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	syntaxcheck_free_advice();
>
>   	return FWTS_OK;
> diff --git a/src/bios/ebda_region/ebda_region.c b/src/bios/ebda_region/ebda_region.c
> index cf74e05..8f52a01 100644
> --- a/src/bios/ebda_region/ebda_region.c
> +++ b/src/bios/ebda_region/ebda_region.c
> @@ -58,6 +58,8 @@ static int ebda_init(fwts_framework *fw)
>
>   static int ebda_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(memory_map);
>
>   	return FWTS_OK;
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index d66ea80..5f3e8d5 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -549,6 +549,8 @@ static int mtrr_init(fwts_framework *fw)
>
>   static int mtrr_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>   	fwts_list_free(mtrr_list, free);
>   	if (fwts_cpuinfo)
> diff --git a/src/bios/multiproc/mpcheck.c b/src/bios/multiproc/mpcheck.c
> index 790218a..4efe23a 100644
> --- a/src/bios/multiproc/mpcheck.c
> +++ b/src/bios/multiproc/mpcheck.c
> @@ -523,6 +523,8 @@ static int mpcheck_init(fwts_framework *fw)
>
>   static int mpcheck_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	return fwts_mp_data_free(&mp_data);
>   }
>
> diff --git a/src/bios/multiproc/mpdump.c b/src/bios/multiproc/mpdump.c
> index ce3fa68..1bb8e07 100644
> --- a/src/bios/multiproc/mpdump.c
> +++ b/src/bios/multiproc/mpdump.c
> @@ -226,6 +226,8 @@ static int mpdump_init(fwts_framework *fw)
>
>   static int mpdump_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	return fwts_mp_data_free(&mp_data);
>   }
>
> diff --git a/src/bios/os2gap/os2gap.c b/src/bios/os2gap/os2gap.c
> index b1e51d0..7c29353 100644
> --- a/src/bios/os2gap/os2gap.c
> +++ b/src/bios/os2gap/os2gap.c
> @@ -40,6 +40,8 @@ static int os2gap_init(fwts_framework *fw)
>
>   static int os2gap_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (os2gap_memory_map_info)
>   		fwts_memory_map_table_free(os2gap_memory_map_info);
>
> diff --git a/src/cpu/msr/msr.c b/src/cpu/msr/msr.c
> index 0b3f6b0..d5532ca 100644
> --- a/src/cpu/msr/msr.c
> +++ b/src/cpu/msr/msr.c
> @@ -70,6 +70,8 @@ static int msr_init(fwts_framework *fw)
>
>   static int msr_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_cpu_free_info(cpuinfo);
>
>   	return FWTS_OK;
> diff --git a/src/cpu/virt/virt.c b/src/cpu/virt/virt.c
> index c63f064..0367c6a 100644
> --- a/src/cpu/virt/virt.c
> +++ b/src/cpu/virt/virt.c
> @@ -52,6 +52,8 @@ static int virt_init(fwts_framework *fw)
>
>   static int virt_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (fwts_virt_cpuinfo)
>   		fwts_cpu_free_info(fwts_virt_cpuinfo);
>
> diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
> index 53b9208..267b69e 100644
> --- a/src/hotkey/hotkey/hotkey.c
> +++ b/src/hotkey/hotkey/hotkey.c
> @@ -224,6 +224,8 @@ static int hotkey_init(fwts_framework *fw)
>
>   static int hotkey_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_keymap_free(hotkeys);
>   	if (hotkey_dev)
>   		free(hotkey_dev);
> diff --git a/src/hpet/hpet_check/hpet_check.c b/src/hpet/hpet_check/hpet_check.c
> index acde5f4..399bde2 100644
> --- a/src/hpet/hpet_check/hpet_check.c
> +++ b/src/hpet/hpet_check/hpet_check.c
> @@ -156,6 +156,8 @@ static int hpet_check_init(fwts_framework *fw)
>
>   static int hpet_check_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (klog)
>   		fwts_text_list_free(klog);
>
> diff --git a/src/kernel/oops/oops.c b/src/kernel/oops/oops.c
> index 5e16ce9..33ae5ae 100644
> --- a/src/kernel/oops/oops.c
> +++ b/src/kernel/oops/oops.c
> @@ -42,6 +42,8 @@ static int oops_init(fwts_framework *fw)
>
>   static int oops_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	fwts_klog_free(klog);
>
>   	return FWTS_OK;
> diff --git a/src/pci/maxreadreq/maxreadreq.c b/src/pci/maxreadreq/maxreadreq.c
> index cdf82ce..a570b37 100644
> --- a/src/pci/maxreadreq/maxreadreq.c
> +++ b/src/pci/maxreadreq/maxreadreq.c
> @@ -55,6 +55,8 @@ static int maxreadreq_init(fwts_framework *fw)
>
>   static int maxreadreq_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
> +
>   	if (lspci_text)
>   		fwts_text_list_free(lspci_text);
>
> diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
> index 686cf2d..319ac76 100644
> --- a/src/uefi/uefirttime/uefirttime.c
> +++ b/src/uefi/uefirttime/uefirttime.c
> @@ -160,6 +160,7 @@ static int uefirttime_init(fwts_framework *fw)
>
>   static int uefirttime_deinit(fwts_framework *fw)
>   {
> +	FWTS_UNUSED(fw);
>
>   	close(fd);
>
>


Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
index d6b4333..d6b899d 100644
--- a/src/acpi/acpidump/acpidump.c
+++ b/src/acpi/acpidump/acpidump.c
@@ -303,6 +303,8 @@  static void acpi_dump_gas(fwts_framework *fw, fwts_acpidump_field *info, void *d
 		FIELD_END
 	};
 
+	FWTS_UNUSED(offset);
+
 	fwts_log_nl(fw);
 	fwts_log_info_verbatum(fw, "%s (Generic Address Structure)",
 		acpi_dump_field_info(info->label, info->size, info->offset));
diff --git a/src/acpi/acpiinfo/acpiinfo.c b/src/acpi/acpiinfo/acpiinfo.c
index c72ba20..d6d3904 100644
--- a/src/acpi/acpiinfo/acpiinfo.c
+++ b/src/acpi/acpiinfo/acpiinfo.c
@@ -33,6 +33,10 @@ 
 static void acpiinfo_check(fwts_framework *fw, char *line,
 	int repeated, char *prevline, void *private, int *errors)
 {
+	FWTS_UNUSED(repeated);
+	FWTS_UNUSED(private);
+	FWTS_UNUSED(errors);
+
 	if (strstr(line, "ACPI: Subsystem revision") != NULL) {
 		char *version = strstr(line, "sion ");
 		if (version) {
@@ -208,6 +212,8 @@  static int acpiinfo_init(fwts_framework *fw)
 
 static int acpiinfo_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_klog_free(klog);
 
 	return FWTS_OK;
diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
index 8cdcc31..d12b1a8 100644
--- a/src/acpi/acpitables/acpitables.c
+++ b/src/acpi/acpitables/acpitables.c
@@ -462,6 +462,9 @@  static void acpi_table_check_madt(fwts_framework *fw, fwts_acpi_table_info *tabl
 
 static void acpi_table_check_mcfg(fwts_framework *fw, fwts_acpi_table_info *table)
 {
+	FWTS_UNUSED(fw);
+	FWTS_UNUSED(table);
+
 	/* FIXME */
 	/*fwts_acpi_table_mcfg *mcfg = (fwts_acpi_table_mcfg*)table->data;*/
 }
diff --git a/src/acpi/brightness/brightness.c b/src/acpi/brightness/brightness.c
index f85a06a..374fcfd 100644
--- a/src/acpi/brightness/brightness.c
+++ b/src/acpi/brightness/brightness.c
@@ -47,6 +47,8 @@  static int brightness_init(fwts_framework *fw)
 
 static int brightness_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if (brightnessdir)
 		closedir(brightnessdir);
 
diff --git a/src/acpi/common/common.c b/src/acpi/common/common.c
index ef89314..b4d7c57 100644
--- a/src/acpi/common/common.c
+++ b/src/acpi/common/common.c
@@ -48,6 +48,8 @@  static int dmesg_common_init(fwts_framework *fw)
 
 static int dmesg_common_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_klog_free(klog);
 
 	return FWTS_OK;
diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
index 3200a56..ba1b0ee 100644
--- a/src/acpi/dmar/dmar.c
+++ b/src/acpi/dmar/dmar.c
@@ -293,6 +293,11 @@  static int dmar_acpi_table_check(fwts_framework *fw)
 static void acpiinfo_check(fwts_framework *fw,
 	char *line, int repeated, char *prevline, void *private, int *errors)
 {
+	FWTS_UNUSED(repeated);
+	FWTS_UNUSED(prevline);
+	FWTS_UNUSED(private);
+	FWTS_UNUSED(errors);
+
         if (strstr(line, "DMAR:[fault reason"))
 		fwts_failed(fw, LOG_LEVEL_MEDIUM, "DMARError",
 		"Found DMAR error: %s", line);
diff --git a/src/acpi/klog/klog.c b/src/acpi/klog/klog.c
index 488d9fb..ea79047 100644
--- a/src/acpi/klog/klog.c
+++ b/src/acpi/klog/klog.c
@@ -42,6 +42,8 @@  static int klog_init(fwts_framework *fw)
 
 static int klog_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_klog_free(klog);
 
 	return FWTS_OK;
diff --git a/src/acpi/mcfg/mcfg.c b/src/acpi/mcfg/mcfg.c
index 9dfd9fd..962250a 100644
--- a/src/acpi/mcfg/mcfg.c
+++ b/src/acpi/mcfg/mcfg.c
@@ -111,6 +111,8 @@  static int mcfg_init(fwts_framework *fw)
 
 static int mcfg_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if (memory_map_list)
 		fwts_memory_map_table_free(memory_map_list);
 
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 2c4d390..fd57015 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -524,6 +524,8 @@  static void method_test_buffer_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) == FWTS_OK)
 		fwts_passed(fw, "%s correctly returned a buffer of %" PRIu32 " elements.",
 			name, obj->Buffer.Length);
@@ -540,6 +542,9 @@  static void method_test_integer_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(obj);
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
 		fwts_passed(fw, "%s correctly returned an integer.", name);
 }
@@ -555,6 +560,9 @@  static void method_test_string_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(obj);
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_STRING) == FWTS_OK)
 		fwts_passed(fw, "%s correctly returned a string.", name);
 }
@@ -570,6 +578,8 @@  static void method_test_NULL_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (buf->Length && buf->Pointer) {
 		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodShouldReturnNothing", "%s returned values, but was expected to return nothing.", name);
 		fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN);
@@ -728,6 +738,9 @@  static void method_test_HID_return(
 {
 	char tmp[8];
 
+	FWTS_UNUSED(buf);
+	FWTS_UNUSED(private);
+
 	if (obj == NULL) {
 		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
 			"Method %s returned a NULL object, and did not "
@@ -807,6 +820,8 @@  static void method_test_PLD_return(
 {
 	uint32_t i;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -836,6 +851,9 @@  static void method_test_SUB_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(buf);
+	FWTS_UNUSED(private);
+
 	if (obj == NULL) {
 		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
 			"Method %s returned a NULL object, and did not "
@@ -889,6 +907,9 @@  static void method_test_UID_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(buf);
+	FWTS_UNUSED(private);
+
 	if (obj == NULL){
 		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodReturnNullObj",
 			"Method %s returned a NULL object, and did not "
@@ -973,6 +994,8 @@  static void method_test_EDL_return(
 {
 	uint32_t i;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1044,6 +1067,8 @@  static void method_test_STA_return(
 {
 	bool failed = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
 		if ((obj->Integer.Value & 3) == 2) {
 			fwts_failed(fw, LOG_LEVEL_MEDIUM,
@@ -1112,6 +1137,8 @@  static void method_test_SEG_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
 		if ((obj->Integer.Value & 0xffff0000)) {
 			fwts_failed(fw, LOG_LEVEL_MEDIUM,
@@ -1206,6 +1233,8 @@  static void method_test_power_resources_return(
 {
 	uint32_t i;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1288,6 +1317,8 @@  static void method_test_Sx__return(
 {
 	bool failed = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1451,6 +1482,8 @@  static void method_test_CPC_return(
 {
 	bool failed = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1504,6 +1537,8 @@  static void method_test_CSD_return(
 	uint32_t i;
 	bool failed = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1629,6 +1664,8 @@  static void method_test_PCT_return(
 	uint32_t i;
 	bool failed = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1681,6 +1718,8 @@  static void method_test_PSS_return(
 	uint32_t prev_power = 0;
 	bool max_freq_valid = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1852,6 +1891,8 @@  static void method_test_TSD_return(
 	uint32_t i;
 	bool failed = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -1978,6 +2019,8 @@  static void method_test_TSS_return(
 	uint32_t i;
 	bool failed = false;
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
 		return;
 
@@ -2105,6 +2148,8 @@  static void method_test_LID_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
 		fwts_passed(fw,
 			"_LID correctly returned sane looking value 0x%8.8" PRIx64,
@@ -2128,6 +2173,8 @@  static void method_test_GCP_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
 		if (obj->Integer.Value & ~0xf) {
 			fwts_failed(fw, LOG_LEVEL_MEDIUM,
@@ -2158,6 +2205,8 @@  static void method_test_GRT_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) != FWTS_OK)
 		return;
 
@@ -2190,6 +2239,8 @@  static void method_test_GWS_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
 		if (obj->Integer.Value & ~0x3) {
 			fwts_failed(fw, LOG_LEVEL_MEDIUM,
@@ -2285,6 +2336,8 @@  static void method_test_SBS_return(
 		"Maximum 4 Smart Batteries, system manager/selector present"
 	};
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
 		switch (obj->Integer.Value) {
 		case 0 ... 4:
@@ -2339,6 +2392,8 @@  static void method_test_BIF_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		uint32_t i;
 		int failed = 0;
@@ -2484,6 +2539,8 @@  static void method_test_BIX_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		uint32_t i;
 		int failed = 0;
@@ -2658,6 +2715,8 @@  static void method_test_BST_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		uint32_t i;
 		int failed = 0;
@@ -2751,6 +2810,12 @@  static void method_test_PCL_return(fwts_framework *fw,
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(fw);
+	FWTS_UNUSED(name);
+	FWTS_UNUSED(buf);
+	FWTS_UNUSED(obj);
+	FWTS_UNUSED(private);
+
 	/* FIXME */
 }
 
@@ -2784,6 +2849,8 @@  static void method_test_BMD_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		uint32_t i;
 		int failed = 0;
@@ -2848,6 +2915,8 @@  static void method_test_PSR_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK) {
 		if (obj->Integer.Value > 2) {
 			fwts_failed(fw, LOG_LEVEL_MEDIUM,
@@ -2876,6 +2945,8 @@  static void method_test_PIF_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		fwts_method_dump_object(fw, obj);
 
@@ -2924,6 +2995,8 @@  static void method_test_FIF_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		fwts_method_dump_object(fw, obj);
 
@@ -2983,6 +3056,8 @@  static void method_test_FST_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		fwts_method_dump_object(fw, obj);
 
@@ -3200,6 +3275,8 @@  static void method_test_RTV_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) == FWTS_OK)
 		fwts_passed(fw,
 			"_RTV correctly returned sane looking value 0x%8.8" PRIx64,
@@ -3464,6 +3541,8 @@  static void method_test_DOD_return(
 		"Reserved"
 	};
 
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		uint32_t i;
 
@@ -3514,6 +3593,9 @@  static void method_test_ROM_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(obj);
+	FWTS_UNUSED(private);
+
 	method_check_type(fw, name, buf, ACPI_TYPE_BUFFER);
 }
 
@@ -3571,6 +3653,8 @@  static void method_test_BCL_return(
 	ACPI_OBJECT *obj,
 	void *private)
 {
+	FWTS_UNUSED(private);
+
 	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) {
 		uint32_t i;
 		int failed = 0;
@@ -3691,6 +3775,8 @@  static void method_test_DDC_return(
 {
 	uint32_t requested = *(uint32_t*)private;
 
+	FWTS_UNUSED(buf);
+
 	if (obj == NULL){
 		fwts_failed(fw, LOG_LEVEL_MEDIUM,
 			"MethodReturnNullObj",
diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
index ece6799..326f639 100644
--- a/src/acpi/s3/s3.c
+++ b/src/acpi/s3/s3.c
@@ -301,6 +301,8 @@  static int s3_test_multiple(fwts_framework *fw)
 
 static int s3_options_check(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if ((s3_multiple < 0) || (s3_multiple > 100000)) {
 		fprintf(stderr, "--s3-multiple is %d, it should be 1..100000\n", s3_multiple);
 		return FWTS_ERROR;
@@ -334,6 +336,10 @@  static int s3_options_check(fwts_framework *fw)
 
 static int s3_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
 {
+	FWTS_UNUSED(fw);
+	FWTS_UNUSED(argc);
+	FWTS_UNUSED(argv);
+
         switch (option_char) {
         case 0:
                 switch (long_index) {
diff --git a/src/acpi/s3power/s3power.c b/src/acpi/s3power/s3power.c
index a57bcba..a8a7c25 100644
--- a/src/acpi/s3power/s3power.c
+++ b/src/acpi/s3power/s3power.c
@@ -238,6 +238,8 @@  static int s3power_test(fwts_framework *fw)
 
 static int s3power_options_check(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if ((s3power_sleep_delay < 600) || (s3power_sleep_delay > 24*60*60)) {
 		fprintf(stderr, "--s3power-sleep-delay is %d, it cannot be less than 600 seconds or more than 24 hours!\n", s3power_sleep_delay);
 		return FWTS_ERROR;
@@ -247,6 +249,10 @@  static int s3power_options_check(fwts_framework *fw)
 
 static int s3power_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
 {
+	FWTS_UNUSED(fw);
+	FWTS_UNUSED(argc);
+	FWTS_UNUSED(argv);
+
         switch (option_char) {
         case 0:
                 switch (long_index) {
diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
index 23f8790..2d0f548 100644
--- a/src/acpi/s4/s4.c
+++ b/src/acpi/s4/s4.c
@@ -364,6 +364,8 @@  static int s4_test_multiple(fwts_framework *fw)
 
 static int s4_options_check(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if ((s4_multiple < 0) || (s4_multiple > 100000)) {
 		fprintf(stderr, "--s4-multiple is %d, it should be 1..100000\n", s4_multiple);
 		return FWTS_ERROR;
@@ -397,6 +399,9 @@  static int s4_options_check(fwts_framework *fw)
 
 static int s4_options_handler(fwts_framework *fw, int argc, char * const argv[], int option_char, int long_index)
 {
+	FWTS_UNUSED(fw);
+	FWTS_UNUSED(argc);
+	FWTS_UNUSED(argv);
 
         switch (option_char) {
         case 0:
diff --git a/src/acpi/syntaxcheck/syntaxcheck.c b/src/acpi/syntaxcheck/syntaxcheck.c
index 5ae7411..ad9efcc 100644
--- a/src/acpi/syntaxcheck/syntaxcheck.c
+++ b/src/acpi/syntaxcheck/syntaxcheck.c
@@ -58,6 +58,8 @@  static int syntaxcheck_init(fwts_framework *fw)
 
 static int syntaxcheck_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	syntaxcheck_free_advice();
 
 	return FWTS_OK;
diff --git a/src/bios/ebda_region/ebda_region.c b/src/bios/ebda_region/ebda_region.c
index cf74e05..8f52a01 100644
--- a/src/bios/ebda_region/ebda_region.c
+++ b/src/bios/ebda_region/ebda_region.c
@@ -58,6 +58,8 @@  static int ebda_init(fwts_framework *fw)
 
 static int ebda_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_klog_free(memory_map);
 
 	return FWTS_OK;
diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
index d66ea80..5f3e8d5 100644
--- a/src/bios/mtrr/mtrr.c
+++ b/src/bios/mtrr/mtrr.c
@@ -549,6 +549,8 @@  static int mtrr_init(fwts_framework *fw)
 
 static int mtrr_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_klog_free(klog);
 	fwts_list_free(mtrr_list, free);
 	if (fwts_cpuinfo)
diff --git a/src/bios/multiproc/mpcheck.c b/src/bios/multiproc/mpcheck.c
index 790218a..4efe23a 100644
--- a/src/bios/multiproc/mpcheck.c
+++ b/src/bios/multiproc/mpcheck.c
@@ -523,6 +523,8 @@  static int mpcheck_init(fwts_framework *fw)
 
 static int mpcheck_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	return fwts_mp_data_free(&mp_data);
 }
 
diff --git a/src/bios/multiproc/mpdump.c b/src/bios/multiproc/mpdump.c
index ce3fa68..1bb8e07 100644
--- a/src/bios/multiproc/mpdump.c
+++ b/src/bios/multiproc/mpdump.c
@@ -226,6 +226,8 @@  static int mpdump_init(fwts_framework *fw)
 
 static int mpdump_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	return fwts_mp_data_free(&mp_data);
 }
 
diff --git a/src/bios/os2gap/os2gap.c b/src/bios/os2gap/os2gap.c
index b1e51d0..7c29353 100644
--- a/src/bios/os2gap/os2gap.c
+++ b/src/bios/os2gap/os2gap.c
@@ -40,6 +40,8 @@  static int os2gap_init(fwts_framework *fw)
 
 static int os2gap_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if (os2gap_memory_map_info)
 		fwts_memory_map_table_free(os2gap_memory_map_info);
 
diff --git a/src/cpu/msr/msr.c b/src/cpu/msr/msr.c
index 0b3f6b0..d5532ca 100644
--- a/src/cpu/msr/msr.c
+++ b/src/cpu/msr/msr.c
@@ -70,6 +70,8 @@  static int msr_init(fwts_framework *fw)
 
 static int msr_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_cpu_free_info(cpuinfo);
 
 	return FWTS_OK;
diff --git a/src/cpu/virt/virt.c b/src/cpu/virt/virt.c
index c63f064..0367c6a 100644
--- a/src/cpu/virt/virt.c
+++ b/src/cpu/virt/virt.c
@@ -52,6 +52,8 @@  static int virt_init(fwts_framework *fw)
 
 static int virt_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if (fwts_virt_cpuinfo)
 		fwts_cpu_free_info(fwts_virt_cpuinfo);
 
diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
index 53b9208..267b69e 100644
--- a/src/hotkey/hotkey/hotkey.c
+++ b/src/hotkey/hotkey/hotkey.c
@@ -224,6 +224,8 @@  static int hotkey_init(fwts_framework *fw)
 
 static int hotkey_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_keymap_free(hotkeys);
 	if (hotkey_dev)
 		free(hotkey_dev);
diff --git a/src/hpet/hpet_check/hpet_check.c b/src/hpet/hpet_check/hpet_check.c
index acde5f4..399bde2 100644
--- a/src/hpet/hpet_check/hpet_check.c
+++ b/src/hpet/hpet_check/hpet_check.c
@@ -156,6 +156,8 @@  static int hpet_check_init(fwts_framework *fw)
 
 static int hpet_check_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if (klog)
 		fwts_text_list_free(klog);
 
diff --git a/src/kernel/oops/oops.c b/src/kernel/oops/oops.c
index 5e16ce9..33ae5ae 100644
--- a/src/kernel/oops/oops.c
+++ b/src/kernel/oops/oops.c
@@ -42,6 +42,8 @@  static int oops_init(fwts_framework *fw)
 
 static int oops_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	fwts_klog_free(klog);
 
 	return FWTS_OK;
diff --git a/src/pci/maxreadreq/maxreadreq.c b/src/pci/maxreadreq/maxreadreq.c
index cdf82ce..a570b37 100644
--- a/src/pci/maxreadreq/maxreadreq.c
+++ b/src/pci/maxreadreq/maxreadreq.c
@@ -55,6 +55,8 @@  static int maxreadreq_init(fwts_framework *fw)
 
 static int maxreadreq_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
+
 	if (lspci_text)
 		fwts_text_list_free(lspci_text);
 
diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
index 686cf2d..319ac76 100644
--- a/src/uefi/uefirttime/uefirttime.c
+++ b/src/uefi/uefirttime/uefirttime.c
@@ -160,6 +160,7 @@  static int uefirttime_init(fwts_framework *fw)
 
 static int uefirttime_deinit(fwts_framework *fw)
 {
+	FWTS_UNUSED(fw);
 
 	close(fd);