Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/acpitools/acpidump acpidump: fix lint errors



details:   https://anonhg.NetBSD.org/src/rev/bd405fc9cdf8
branches:  trunk
changeset: 986234:bd405fc9cdf8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 14 20:34:36 2021 +0000

description:
acpidump: fix lint errors

When lint runs on the code, it defines the preprocessor macro 'lint' to
be 1.  Due to that, this name cannot be used as a regular identifier.

acpi.c(86): error: syntax error '1' [249]
acpi.c(1004): error: syntax error '1' [249]
acpi.c(2422): error: void function acpi_print_lpit cannot return value
    [213]

The FreeBSD code doesn't need this name change since lint is specific to
NetBSD.

No functional change.

diffstat:

 usr.sbin/acpitools/acpidump/acpi.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r 0b6bc931888e -r bd405fc9cdf8 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c        Tue Sep 14 20:13:03 2021 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c        Tue Sep 14 20:34:36 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.50 2021/01/20 15:27:51 skrll Exp $ */
+/* $NetBSD: acpi.c,v 1.51 2021/09/14 20:34:36 rillig Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.50 2021/01/20 15:27:51 skrll Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.51 2021/09/14 20:34:36 rillig Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -83,7 +83,7 @@
                    uint64_t apic_addr);
 static void    acpi_print_mps_flags(uint16_t flags);
 static void    acpi_print_intr(uint32_t intr, uint16_t mps_flags);
-static void    acpi_print_local_nmi(u_int lint, uint16_t mps_flags);
+static void    acpi_print_local_nmi(u_int local_int, uint16_t mps_flags);
 static void    acpi_print_madt(ACPI_SUBTABLE_HEADER *mp);
 static void    acpi_handle_bert(ACPI_TABLE_HEADER *sdp);
 static void    acpi_handle_bgrt(ACPI_TABLE_HEADER *sdp);
@@ -1001,10 +1001,10 @@
 }
 
 static void
-acpi_print_local_nmi(u_int lint, uint16_t mps_flags)
+acpi_print_local_nmi(u_int local_int, uint16_t mps_flags)
 {
 
-       printf("\tLINT Pin=%d\n", lint);
+       printf("\tLINT Pin=%d\n", local_int);
        acpi_print_mps_flags(mps_flags);
 }
 
@@ -2419,7 +2419,7 @@
 #undef PRINTFLAG
 
        if (lpit->Type == ACPI_LPIT_TYPE_NATIVE_CSTATE)
-               return acpi_print_native_lpit((ACPI_LPIT_NATIVE *)lpit);
+               acpi_print_native_lpit((ACPI_LPIT_NATIVE *)lpit);
 }
 
 static void



Home | Main Index | Thread Index | Old Index