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]
Message-ID: <20241114100140.406416-1-oleksandr@natalenko.name>
Date: Thu, 14 Nov 2024 11:01:40 +0100
From: Oleksandr Natalenko <oleksandr@...alenko.name>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Wladislav Wiebe <wladislav.kw@...il.com>
Subject: [PATCH] tools/mm: fix show_page() build error

At one point I needed mm tools for debugging but couldn't compile them due to the
following error:

gcc -Wall -Wextra -I../lib/ -pthread -o page-types page-types.c ../lib/api/libapi.a -pthread
page-types.c: In function ‘show_page’:
page-types.c:423:49: error: expected ‘;’ before ‘if’
  423 |                 printf("@%" PRIu64 "\t", cgroup)
      |                                                 ^
      |                                                 ;
  424 |         if (opt_list_mapcnt)
      |         ~~
page-types.c:416:65: warning: unused parameter ‘mapcnt’ [-Wunused-parameter]
  416 |                       uint64_t flags, uint64_t cgroup, uint64_t mapcnt)
      |                                                        ~~~~~~~~~^~~~~~
make: *** [Makefile:23: page-types] Error 1

Trailing ; was forgotten, so add it.

Fixes: ece5897e5a10 ("tools/mm: -Werror fixes in page-types/slabinfo")
Signed-off-by: Oleksandr Natalenko <oleksandr@...alenko.name>
---
 tools/mm/page-types.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c
index 6eb17cc1a06c5..bcac7ebfb51fd 100644
--- a/tools/mm/page-types.c
+++ b/tools/mm/page-types.c
@@ -420,7 +420,7 @@ static void show_page(unsigned long voffset, unsigned long offset,
 	if (opt_file)
 		printf("%lx\t", voffset);
 	if (opt_list_cgroup)
-		printf("@%" PRIu64 "\t", cgroup)
+		printf("@%" PRIu64 "\t", cgroup);
 	if (opt_list_mapcnt)
 		printf("%" PRIu64 "\t", mapcnt);
 
-- 
2.47.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ