summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cdcontrol
diff options
context:
space:
mode:
authormikeh <mikeh@FreeBSD.org>2001-12-09 18:40:56 +0000
committermikeh <mikeh@FreeBSD.org>2001-12-09 18:40:56 +0000
commitbb541f1f22ede8a1c3980b6004b1583b2f57e9b4 (patch)
tree3c42c0cf90dfaa652e2d03fddf6e3d0b3e0ca171 /usr.sbin/cdcontrol
parent6d39bbaa3cfaa26078dd71fd110c007366b122ef (diff)
downloadFreeBSD-src-bb541f1f22ede8a1c3980b6004b1583b2f57e9b4.zip
FreeBSD-src-bb541f1f22ede8a1c3980b6004b1583b2f57e9b4.tar.gz
WARNS=2 cleanup.
PR: bin/32646 MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/cdcontrol')
-rw-r--r--usr.sbin/cdcontrol/Makefile2
-rw-r--r--usr.sbin/cdcontrol/cdcontrol.c28
2 files changed, 20 insertions, 10 deletions
diff --git a/usr.sbin/cdcontrol/Makefile b/usr.sbin/cdcontrol/Makefile
index a505e3a..ce79034 100644
--- a/usr.sbin/cdcontrol/Makefile
+++ b/usr.sbin/cdcontrol/Makefile
@@ -5,4 +5,6 @@ PROG= cdcontrol
DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap
+WARNS?= 2
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/cdcontrol/cdcontrol.c b/usr.sbin/cdcontrol/cdcontrol.c
index 3e272d3..f5dc3fc 100644
--- a/usr.sbin/cdcontrol/cdcontrol.c
+++ b/usr.sbin/cdcontrol/cdcontrol.c
@@ -78,9 +78,9 @@ static const char rcsid[] =
struct cmdtab {
int command;
- char *name;
- unsigned min;
- char *args;
+ const char *name;
+ unsigned min;
+ const char *args;
} cmdtab[] = {
{ CMD_CLOSE, "close", 1, "" },
{ CMD_DEBUG, "debug", 1, "on | off" },
@@ -103,7 +103,7 @@ struct cmdtab {
{ CMD_STOP, "stop", 3, "" },
{ CMD_VOLUME, "volume", 1, "<l> <r> | left | right | mute | mono | stereo" },
{ CMD_CDID, "cdid", 2, "" },
-{ 0, }
+{ 0, NULL, 0, NULL }
};
struct cd_toc_entry toc_buffer[100];
@@ -133,11 +133,18 @@ unsigned int msf2lba __P((u_char m, u_char s, u_char f));
int play_blocks __P((int blk, int len));
int run __P((int cmd, char *arg));
char *parse __P((char *buf, int *cmd));
+void help __P((void));
+void usage __P((void));
+char *use_cdrom_instead __P((const char *));
+__const char *strstatus __P((int));
+static u_int dbprog_discid __P((void));
+__const char *cdcontrol_prompt __P((void));
void help ()
{
struct cmdtab *c;
- char *s, n;
+ const char *s;
+ char n;
int i;
for (c=cmdtab; c->name; ++c) {
@@ -165,7 +172,7 @@ void usage ()
exit (1);
}
-char *use_cdrom_instead(char *old_envvar)
+char *use_cdrom_instead(const char *old_envvar)
{
char *device;
@@ -427,7 +434,8 @@ int run (int cmd, char *arg)
int play (char *arg)
{
struct ioc_toc_header h;
- int rc, n, start, end = 0, istart = 1, iend = 1;
+ unsigned int n;
+ int rc, start, end = 0, istart = 1, iend = 1;
rc = ioctl (fd, CDIOREADTOCHEADER, &h);
@@ -736,7 +744,7 @@ int next_prev (char *arg, int cmd)
return (play_track (trk, 1, n, 1));
}
-char *strstatus (int sts)
+const char *strstatus (int sts)
{
switch (sts) {
case ASTS_INVALID: return ("invalid");
@@ -905,7 +913,7 @@ int cdid ()
return id ? 0 : 1;
}
-int info (char *arg)
+int info (char *arg __unused)
{
struct ioc_toc_header h;
int rc, i, n;
@@ -1146,7 +1154,7 @@ char *parse (char *buf, int *cmd)
{
struct cmdtab *c;
char *p;
- int len;
+ unsigned int len;
for (p=buf; isspace (*p); p++)
continue;
OpenPOWER on IntegriCloud