Conversation
ChatrusMagnus
left a comment
There was a problem hiding this comment.
I was able to recreate the bug and the commit remooves the warnings,
but I run the checkpatch.pl on attributes.c and it returned 4 errors and 8 warnings.
The error that are a consequence of this commit are:
ERROR: "(foo*)" should be "(foo *)"
#122: FILE: attributes.c:122:
-
_uk_thread = (struct uk_thread*) tp->threadId;
ERROR: "(foo*)" should be "(foo *)"
#142: FILE: attributes.c:142:
-
_uk_thread =(struct uk_thread*) tp->threadId;
ERROR: spaces required around that '=' (ctx:WxV)
#142: FILE: attributes.c:142:
-
_uk_thread =(struct uk_thread*) tp->threadId;
There is an additional error:
ERROR: space required after that ',' (ctx:VxV)
#148: FILE: attributes.c:148:
-
sprintf(name,"%s", _uk_thread->name);
Reviewed-by: Federico fe.chatrian@gmail.com
terminal output:
'WARNING: return of an errno should typically be negative (ie: return -EINVAL)
#37: FILE: attributes.c:37:
-
return EINVAL;
WARNING: return of an errno should typically be negative (ie: return -EINVAL)
#45: FILE: attributes.c:45:
-
return EINVAL;
WARNING: return of an errno should typically be negative (ie: return -ENOENT)
#91: FILE: attributes.c:91:
-
return ENOENT;
WARNING: return of an errno should typically be negative (ie: return -EINVAL)
#94: FILE: attributes.c:94:
-
return EINVAL;
WARNING: return of an errno should typically be negative (ie: return -ENOENT)
#120: FILE: attributes.c:120:
-
return ENOENT;
ERROR: "(foo*)" should be "(foo *)"
#122: FILE: attributes.c:122:
-
_uk_thread = (struct uk_thread*) tp->threadId;
WARNING: return of an errno should typically be negative (ie: return -ERANGE)
#126: FILE: attributes.c:126:
-
return ERANGE;
WARNING: return of an errno should typically be negative (ie: return -ENOENT)
#140: FILE: attributes.c:140:
-
return ENOENT;
ERROR: "(foo*)" should be "(foo *)"
#142: FILE: attributes.c:142:
-
_uk_thread =(struct uk_thread*) tp->threadId;
ERROR: spaces required around that '=' (ctx:WxV)
#142: FILE: attributes.c:142:
-
_uk_thread =(struct uk_thread*) tp->threadId; ^
WARNING: return of an errno should typically be negative (ie: return -ERANGE)
#146: FILE: attributes.c:146:
-
return ERANGE;
ERROR: space required after that ',' (ctx:VxV)
#148: FILE: attributes.c:148:
-
sprintf(name,"%s", _uk_thread->name); ^
total: 4 errors, 8 warnings, 151 lines checked
'
This PR is part of the Unikraft Lyon Hackathon.
This warning occured while building app-sqlite :
You need to cast
tp->threadinstruct uk_thread *to allow the assignment.