mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
bhyve: Let BASL compile with raised warnings
- Make basl_dump() as unused. - Avoid arithmetic on a void pointer. - Avoid a signed/unsigned comparison with BASL_TABLE_CHECKSUM_LEN_FULL_TABLE. - Ignore warnings about unused parameters from stuff pulled in by acpi.h. In particular, any prototype wrapped by ACPI_DBG_DEPENDENT_RETURN_VOID() will raise such parameters unless ACPI_DEBUG_OUTPUT is defined. Reviewed by: corvink, jhb Differential Revision: https://reviews.freebsd.org/D37397
This commit is contained in:
parent
bd634fc733
commit
c127c61efa
|
@ -49,8 +49,7 @@ struct basl_table {
|
||||||
uint32_t len;
|
uint32_t len;
|
||||||
uint32_t off;
|
uint32_t off;
|
||||||
uint32_t alignment;
|
uint32_t alignment;
|
||||||
STAILQ_HEAD(basl_table_checksum_list,
|
STAILQ_HEAD(basl_table_checksum_list, basl_table_checksum) checksums;
|
||||||
basl_table_checksum) checksums;
|
|
||||||
STAILQ_HEAD(basl_table_length_list, basl_table_length) lengths;
|
STAILQ_HEAD(basl_table_length_list, basl_table_length) lengths;
|
||||||
STAILQ_HEAD(basl_table_pointer_list, basl_table_pointer) pointers;
|
STAILQ_HEAD(basl_table_pointer_list, basl_table_pointer) pointers;
|
||||||
};
|
};
|
||||||
|
@ -110,7 +109,7 @@ basl_dump_table(const struct basl_table *const table, const bool mem)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int __unused
|
||||||
basl_dump(const bool mem)
|
basl_dump(const bool mem)
|
||||||
{
|
{
|
||||||
struct basl_table *table;
|
struct basl_table *table;
|
||||||
|
@ -279,7 +278,7 @@ basl_finish_set_length(struct basl_table *const table)
|
||||||
assert(length->off < table->len);
|
assert(length->off < table->len);
|
||||||
assert(length->off + length->size <= table->len);
|
assert(length->off + length->size <= table->len);
|
||||||
|
|
||||||
basl_le_enc(table->data + length->off, table->len,
|
basl_le_enc((uint8_t *)table->data + length->off, table->len,
|
||||||
length->size);
|
length->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <contrib/dev/acpica/include/acpi.h>
|
#include <contrib/dev/acpica/include/acpi.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
#define ACPI_GAS_ACCESS_WIDTH_LEGACY 0
|
#define ACPI_GAS_ACCESS_WIDTH_LEGACY 0
|
||||||
#define ACPI_GAS_ACCESS_WIDTH_UNDEFINED 0
|
#define ACPI_GAS_ACCESS_WIDTH_UNDEFINED 0
|
||||||
|
@ -20,7 +23,7 @@
|
||||||
#define BASL_TABLE_ALIGNMENT 0x10
|
#define BASL_TABLE_ALIGNMENT 0x10
|
||||||
#define BASL_TABLE_ALIGNMENT_FACS 0x40
|
#define BASL_TABLE_ALIGNMENT_FACS 0x40
|
||||||
|
|
||||||
#define BASL_TABLE_CHECKSUM_LEN_FULL_TABLE (-1)
|
#define BASL_TABLE_CHECKSUM_LEN_FULL_TABLE (-1U)
|
||||||
|
|
||||||
#define BASL_EXEC(x) \
|
#define BASL_EXEC(x) \
|
||||||
do { \
|
do { \
|
||||||
|
|
Loading…
Reference in a new issue