kernel: make cmderror() _Noreturn

This commit is contained in:
cinap_lenrek 2024-10-23 21:26:39 +00:00
parent 9a22996da2
commit 235681677d
6 changed files with 2 additions and 10 deletions

View file

@ -189,8 +189,6 @@ netlogctl(Fs *f, char* s, int n)
ct = lookupcmd(cb, routecmd, nelem(routecmd));
SET(set);
switch(ct->index){
case CMset:
set = 1;

View file

@ -2487,7 +2487,6 @@ iawtopctl(SDev *, Cmdbuf *cmd)
char **f;
f = cmd->f;
v = 0;
if(strcmp(f[0], "debug") == 0)
v = &debug;

View file

@ -73,7 +73,7 @@ parsecmd(char *p, int n)
/*
* Reconstruct original message, for error diagnostic
*/
void
_Noreturn void
cmderror(Cmdbuf *cb, char *s)
{
int i;
@ -113,5 +113,4 @@ lookupcmd(Cmdbuf *cb, Cmdtab *ctab, int nctab)
}
cmderror(cb, "unknown control message");
return nil;
}

View file

@ -37,7 +37,7 @@ void closefgrp(Fgrp*);
void closepgrp(Pgrp*);
void closergrp(Rgrp*);
long clrfpintr(void);
void cmderror(Cmdbuf*, char*);
_Noreturn void cmderror(Cmdbuf*, char*);
int cmount(Chan*, Chan*, int, char*);
void confinit(void);
int consactive(void);

View file

@ -463,7 +463,6 @@ static int
aoewctl(SDunit *, Cmdbuf *cmd)
{
cmderror(cmd, Ebadarg);
return 0;
}
static SDev*
@ -503,7 +502,6 @@ aoewtopctl(SDev *, Cmdbuf *cmd)
default:
cmderror(cmd, Ebadarg);
}
return 0;
}
SDifc sdaoeifc = {

View file

@ -337,7 +337,6 @@ static int
loopwctl(SDunit *, Cmdbuf *cmd)
{
cmderror(cmd, Ebadarg);
return 0;
}
static SDev*
@ -376,7 +375,6 @@ loopwtopctl(SDev *, Cmdbuf *cmd)
default:
cmderror(cmd, Ebadarg);
}
return 0;
}
SDifc sdloopifc = {