lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Dec 2022 21:24:17 +0700
From:   Ammar Faizi <ammarfaizi2@...weeb.org>
To:     Robert Moore <robert.moore@...el.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Ammar Faizi <ammarfaizi2@...weeb.org>, Len Brown <lenb@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Linux ACPI Mailing List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        ACPICA Mailing List <devel@...ica.org>,
        LLVM Mailing List <llvm@...ts.linux.dev>,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>
Subject: [PATCH v1 0/2] clang warning cleanups

From: Ammar Faizi <ammarfaizi2@...weeb.org>

Hi,

On top of Linus' tree. This series fixes clang warnings.

Base commit: 8395ae05cb5a2e31d36106e8c85efa11cda849be ("Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi")

# Patch 1:

  Compiling with clang-16:

    drivers/acpi/acpi_lpit.c:142:6: error: no previous prototype \
    for function 'acpi_init_lpit' [-Werror,-Wmissing-prototypes]

    drivers/acpi/ioapic.c:212:6: error: no previous prototype \
    for function 'pci_ioapic_remove' [-Werror,-Wmissing-prototypes]

    drivers/acpi/ioapic.c:229:5: error: no previous prototype \
    for function 'acpi_ioapic_remove' [-Werror,-Wmissing-prototypes]

  Include "internal.h" to silence them.

# Patch 2:

  @num_carats is used for debugging, passed to the 'ACPI_DEBUG_PRINT()'
  macro. But this macro will expand to nothing when debug is disabled,
  resulting in the following (clang-16):

    drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set \
    but not used [-Werror,-Wunused-but-set-variable]
          u32 num_carats;
              ^
    1 error generated.

  Move the variable declaration inside the else block to reduce the scope,
  then add '(void)num_carats' to silence the warning when debug is disabled.

Signed-off-by: Ammar Faizi <ammarfaizi2@...weeb.org>
---

Ammar Faizi (2):
  ACPI: Silence missing prototype warnings
  ACPICA: Silence 'unused-but-set variable' warning

 drivers/acpi/acpi_lpit.c       | 1 +
 drivers/acpi/acpica/nsaccess.c | 4 ++--
 drivers/acpi/ioapic.c          | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)


base-commit: 8395ae05cb5a2e31d36106e8c85efa11cda849be
-- 
Ammar Faizi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ