From 49b4e91f228885cd8e7012d80150d197008d69e6 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 4 Aug 2023 13:28:27 +0200 Subject: [PATCH] readutmp tests: Fix gcc warning (regression from yesterday). * tests/test-readutmp.c: Include idx.h. (main): Use idx_t instead of size_t. --- ChangeLog | 6 ++++++ tests/test-readutmp.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8730fd9bc8..dc30f193f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-08-04 Bruno Haible + + readutmp tests: Fix gcc warning (regression from yesterday). + * tests/test-readutmp.c: Include idx.h. + (main): Use idx_t instead of size_t. + 2023-08-03 Paul Eggert readutmp: systemd supports only UTMP_FILE diff --git a/tests/test-readutmp.c b/tests/test-readutmp.c index b03c5f9e47..7afba18b87 100644 --- a/tests/test-readutmp.c +++ b/tests/test-readutmp.c @@ -26,6 +26,7 @@ #include #include +#include "idx.h" #include "xalloc.h" #define ELEMENT STRUCT_UTMP @@ -40,7 +41,7 @@ int main (int argc, char *argv[]) { STRUCT_UTMP *entries; - size_t num_entries; + idx_t num_entries; if (read_utmp (UTMP_FILE, &num_entries, &entries, 0) < 0) { @@ -100,7 +101,7 @@ main (int argc, char *argv[]) merge_sort_inplace (entries, num_entries, XNMALLOC (num_entries, STRUCT_UTMP)); - size_t i; + idx_t i; for (i = 0; i < num_entries; i++) { const STRUCT_UTMP *entry = &entries[i]; -- 2.39.5