// successful, it returns the command and the bytes remaining after
// the command, which should be passed to the command.
func getCmd(line []byte) (*cmd, []byte) {
- sc, ev := newScanner(line);
+ sc, _ := newScanner(line);
pos, tok, lit := sc.Scan();
if sc.ErrorCount != 0 || tok != token.IDENT {
return nil, nil;
var toks [4]token.Token;
var lits [4][]byte;
for i := range toks {
- var pos token.Position;
- pos, toks[i], lits[i] = sc.Scan();
+ _, toks[i], lits[i] = sc.Scan();
}
if sc.ErrorCount != 0 {
err = ev.GetError(scanner.NoMultiples);
func parseNoArgs(args []byte, usage string) os.Error {
sc, ev := newScanner(args);
- pos, tok, lit := sc.Scan();
+ _, tok, _ := sc.Scan();
if sc.ErrorCount != 0 {
return ev.GetError(scanner.NoMultiples);
}
}
// Get the type map for this architecture
- typeMap, ok := manualTypes[arch];
+ typeMap, _ := manualTypes[arch];
if typeMap == nil {
typeMap = make(map[eval.Type] *remoteType);
manualTypes[arch] = typeMap;
rt = &remoteType{t, arch.PtrSize(), arch.PtrSize(), mk};
// Construct the element type after registering the
// type to break cycles.
- typeMap[t] = rt;
+ typeMap[eval.Type(t)] = rt;
elem = newManualType(t.Elem, arch);
case *eval.ArrayType:
// Symbol name
name := sc.BaseName();
- if prev, ok := pkg[name]; ok {
+ if _, ok := pkg[name]; ok {
log.Stderrf("Multiple definitions of symbol %s", sc.Name);
continue;
}