summaryrefslogtreecommitdiffstats
path: root/sbin/camcontrol
diff options
context:
space:
mode:
authorjohan <johan@FreeBSD.org>2003-02-20 21:07:59 +0000
committerjohan <johan@FreeBSD.org>2003-02-20 21:07:59 +0000
commitb8e76084ebcdc74f8d2e595baaf6fcff8f80d3e0 (patch)
tree2ec7011bd989f809329cda15b18559f7d72a53f6 /sbin/camcontrol
parent72688ad7fe6ac65cbfc2c4d260ba7d901bf1bcc2 (diff)
downloadFreeBSD-src-b8e76084ebcdc74f8d2e595baaf6fcff8f80d3e0.zip
FreeBSD-src-b8e76084ebcdc74f8d2e595baaf6fcff8f80d3e0.tar.gz
Make camcontrol WARNS=2 clean.
Approved by: ken
Diffstat (limited to 'sbin/camcontrol')
-rw-r--r--sbin/camcontrol/Makefile1
-rw-r--r--sbin/camcontrol/camcontrol.c10
-rw-r--r--sbin/camcontrol/modeedit.c2
-rw-r--r--sbin/camcontrol/util.c6
4 files changed, 12 insertions, 7 deletions
diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile
index 0c5ada4..889a2fc 100644
--- a/sbin/camcontrol/Makefile
+++ b/sbin/camcontrol/Makefile
@@ -9,7 +9,6 @@ SRCS+= modeedit.c
.else
CFLAGS+= -DMINIMALISTIC
.endif
-WARNS= 0
DPADD= ${LIBCAM} ${LIBSBUF}
LDADD= -lcam -lsbuf
MAN= camcontrol.8
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index a048442..dda3c7d 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -29,7 +29,9 @@
*/
#include <sys/ioctl.h>
+#include <sys/stdint.h>
#include <sys/types.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -3086,10 +3088,12 @@ scsiformat(struct cam_device *device, int argc, char **argv,
percentage = 10000 * val;
fprintf(stdout,
- "\rFormatting: %qd.%02qd %% "
+ "\rFormatting: %ju.%02u %% "
"(%d/%d) done",
- percentage / (0x10000 * 100),
- (percentage / 0x10000) % 100,
+ (uintmax_t)(percentage /
+ (0x10000 * 100)),
+ (unsigned)((percentage /
+ 0x10000) % 100),
val, 0x10000);
fflush(stdout);
} else if ((quiet == 0)
diff --git a/sbin/camcontrol/modeedit.c b/sbin/camcontrol/modeedit.c
index 589583d..7aeac58 100644
--- a/sbin/camcontrol/modeedit.c
+++ b/sbin/camcontrol/modeedit.c
@@ -641,7 +641,7 @@ modepage_read(FILE *file)
char *line; /* Pointer to static fgetln buffer. */
char *name; /* Name portion of the line buffer. */
char *value; /* Value portion of line buffer. */
- int length; /* Length of static fgetln buffer. */
+ size_t length; /* Length of static fgetln buffer. */
#define ABORT_READ(message, param) do { \
warnx(message, param); \
diff --git a/sbin/camcontrol/util.c b/sbin/camcontrol/util.c
index 63f952d..272d2a1 100644
--- a/sbin/camcontrol/util.c
+++ b/sbin/camcontrol/util.c
@@ -48,10 +48,12 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
+#include <sys/stdint.h>
+#include <sys/types.h>
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <sys/types.h>
#include <camlib.h>
#include "camcontrol.h"
@@ -116,7 +118,7 @@ arg_put(void *hook, int letter, void *arg, int count, char *name)
{
case 'i':
case 'b':
- printf("%d ", (intptr_t)arg);
+ printf("%jd ", (intmax_t)(intptr_t)arg);
break;
case 'c':
OpenPOWER on IntegriCloud