]> git.cameronkatri.com Git - bsd-progress.git/commitdiff
Printf field widths and size_t don't always mix well, so cast to int.
authorhe <he@NetBSD.org>
Fri, 20 May 2005 07:26:01 +0000 (07:26 +0000)
committerhe <he@NetBSD.org>
Fri, 20 May 2005 07:26:01 +0000 (07:26 +0000)
Fixes build problem for alpha.

progressbar.c

index 931e01b696d110da55faacecaf4318d52b3600e0..e9b63663b2770560919d8d3f8064cbc690f18590 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: progressbar.c,v 1.8 2005/05/19 03:05:04 lukem Exp $    */
+/*     $NetBSD: progressbar.c,v 1.9 2005/05/20 07:26:01 he Exp $       */
 
 /*-
  * Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: progressbar.c,v 1.8 2005/05/19 03:05:04 lukem Exp $");
+__RCSID("$NetBSD: progressbar.c,v 1.9 2005/05/20 07:26:01 he Exp $");
 #endif /* not lint */
 
 /*
@@ -220,7 +220,7 @@ progressmeter(int flag)
                if (barlength > 0) {
                        i = barlength * ratio / 100;
                        len += snprintf(buf + len, BUFLEFT,
-                           "|%.*s%*s|", i, stars, barlength - i, "");
+                           "|%.*s%*s|", i, stars, (int)(barlength - i), "");
                }
        }