fix array vs pointer function declaration.
also, in some callers, and make sure to provide all the accessed backing for a string array. found by GCC 12.
This commit is contained in:
parent
69fe22838c
commit
df4d49549c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apple_smc.c,v 1.8 2021/08/07 16:19:12 thorpej Exp $ */
|
||||
/* $NetBSD: apple_smc.c,v 1.9 2023/08/08 05:20:14 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Apple System Management Controller
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.8 2021/08/07 16:19:12 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.9 2023/08/08 05:20:14 mrg Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -476,7 +476,7 @@ apple_smc_release_key(struct apple_smc_tag *smc, struct apple_smc_key *key)
|
|||
}
|
||||
|
||||
int
|
||||
apple_smc_key_search(struct apple_smc_tag *smc, const char *name,
|
||||
apple_smc_key_search(struct apple_smc_tag *smc, const char name[4 + 1],
|
||||
uint32_t *result)
|
||||
{
|
||||
struct apple_smc_key *key;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apple_smc_temp.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $ */
|
||||
/* $NetBSD: apple_smc_temp.c,v 1.7 2023/08/08 05:20:14 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Apple System Management Controller: Temperature Sensors
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: apple_smc_temp.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apple_smc_temp.c,v 1.7 2023/08/08 05:20:14 mrg Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -425,12 +425,12 @@ apple_smc_bound_temp_sensors(struct apple_smc_tag *smc, uint32_t *tstart,
|
|||
int error;
|
||||
|
||||
/* Find the first `T...' key. */
|
||||
error = apple_smc_key_search(smc, "T", tstart);
|
||||
error = apple_smc_key_search(smc, "T\0\0\0", tstart);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
/* Find the first `U...' key. */
|
||||
error = apple_smc_key_search(smc, "U", ustart);
|
||||
error = apple_smc_key_search(smc, "U\0\0\0", ustart);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
|
Loading…
Reference in New Issue