summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/who.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/who.c b/src/who.c
index c57e14fd8..ffcb6550f 100644
--- a/src/who.c
+++ b/src/who.c
@@ -393,6 +393,8 @@ static char *
make_id_equals_comment (STRUCT_UTMP const *utmp_ent)
{
char *comment = xmalloc (sizeof (_("id=")) + sizeof UT_ID (utmp_ent) + 1);
+
+ /* Cast field width argument to `int' to avoid warning from gcc. */
sprintf (comment, "%s%.*s", _("id="), (int) sizeof UT_ID (utmp_ent),
UT_ID (utmp_ent));
return comment;