Make camcontrol WARNS=2 clean.

Approved by:	ken
This commit is contained in:
Johan Karlsson 2003-02-20 21:07:59 +00:00
parent 263444cfbf
commit c7cf7aa684
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111195
4 changed files with 12 additions and 7 deletions

View File

@ -9,7 +9,6 @@ SRCS+= modeedit.c
.else
CFLAGS+= -DMINIMALISTIC
.endif
WARNS= 0
DPADD= ${LIBCAM} ${LIBSBUF}
LDADD= -lcam -lsbuf
MAN= camcontrol.8

View File

@ -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)

View File

@ -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); \

View File

@ -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':