mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
libbio, libmach: warnings from the Plan 9 tool chain
Superficial inconsistencies that trigger warnings in Plan 9. Small enough to be considered trivial and seemingly benign outside of the Plan 9 environment. LGTM=iant R=golang-codereviews, 0intro, iant CC=golang-codereviews https://golang.org/cl/73460043
This commit is contained in:
parent
8076f21e8e
commit
24192bbd00
3 changed files with 33 additions and 29 deletions
|
|
@ -73,7 +73,7 @@ struct Biobuf
|
||||||
* next few bytes in little-endian order.
|
* next few bytes in little-endian order.
|
||||||
*/
|
*/
|
||||||
#define BGETC(bp)\
|
#define BGETC(bp)\
|
||||||
((bp)->icount?(bp)->ebuf[(bp)->icount++]:Bgetc((bp)))
|
((bp)->icount?(int)((bp)->ebuf[(bp)->icount++]):Bgetc((bp)))
|
||||||
#define BGETLE2(bp)\
|
#define BGETLE2(bp)\
|
||||||
((bp)->icount<=-2?((bp)->icount+=2,((bp)->ebuf[(bp)->icount-2])|((bp)->ebuf[(bp)->icount-1]<<8)):Bgetle2((bp)))
|
((bp)->icount<=-2?((bp)->icount+=2,((bp)->ebuf[(bp)->icount-2])|((bp)->ebuf[(bp)->icount-1]<<8)):Bgetle2((bp)))
|
||||||
#define BGETLE4(bp)\
|
#define BGETLE4(bp)\
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@ Bputrune(Biobuf *bp, long c)
|
||||||
|
|
||||||
rune = (Rune)c;
|
rune = (Rune)c;
|
||||||
if(rune < Runeself) {
|
if(rune < Runeself) {
|
||||||
BPUTC(bp, (int)rune);
|
n = BPUTC(bp, (int)rune);
|
||||||
|
USED(n);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
n = runetochar(str, &rune);
|
n = runetochar(str, &rune);
|
||||||
|
|
|
||||||
|
|
@ -195,11 +195,10 @@ i386trace(Map *map, uvlong pc, uvlong sp, uvlong link, Tracer trace)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if(s.value == morestack) {
|
if(s.value == morestack) {
|
||||||
|
if (0) {
|
||||||
// This code is old and won't work anymore.
|
// This code is old and won't work anymore.
|
||||||
// But no one uses it anyway.
|
// But no one uses it anyway.
|
||||||
// Leave it obviously broken until someone needs it.
|
// Leave it obviously broken until someone needs it.
|
||||||
werrstr("morestack not implemented correctly");
|
|
||||||
return -1;
|
|
||||||
// In the middle of morestack.
|
// In the middle of morestack.
|
||||||
// Caller is m->morepc.
|
// Caller is m->morepc.
|
||||||
// Caller's caller is in m->morearg.
|
// Caller's caller is in m->morearg.
|
||||||
|
|
@ -222,6 +221,10 @@ i386trace(Map *map, uvlong pc, uvlong sp, uvlong link, Tracer trace)
|
||||||
findsym(pc, CTEXT, &s);
|
findsym(pc, CTEXT, &s);
|
||||||
(*trace)(map, pc, sp, &s1); // morestack's caller; caller's caller's PC/SP
|
(*trace)(map, pc, sp, &s1); // morestack's caller; caller's caller's PC/SP
|
||||||
continue;
|
continue;
|
||||||
|
} else {
|
||||||
|
werrstr("morestack not implemented correctly");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pc == lessstack) {
|
if(pc == lessstack) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue