Print this page
6648 illumos build should be explicit about C standards

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/audio/drv/audioemu10k/dsp/asm10k.c
          +++ new/usr/src/uts/common/io/audio/drv/audioemu10k/dsp/asm10k.c
↓ open down ↓ 429 lines elided ↑ open up ↑
 430  430          add_init(ngpr, num, parm);
 431  431  
 432  432          add_symbol(parm, SY_PARM, gpr_base + ngpr++);
 433  433  }
 434  434  
 435  435  static void
 436  436  compile_mono(char **tokens, int cnt)
 437  437  {
 438  438          char *parm, *def;
 439  439          int n, num;
 440      -        char tmp[128];
 441  440  
 442  441          CHECK_COUNT(tokens, cnt, 3, 3);
 443  442  
 444  443          parm = tokens[1];
 445  444          def = tokens[2];
 446  445  
 447  446          n = fle.parms.ngpr;
 448  447          if (n >= MAX_GPR_PARMS) {
 449  448                  error("Too many GPR parameters");
 450  449                  return;
↓ open down ↓ 147 lines elided ↑ open up ↑
 598  597                  compile_rem(tokens, cnt);
 599  598                  return;
 600  599          }
 601  600  
 602  601          error("Unknown directive '%s'", tokens[0]);
 603  602  }
 604  603  
 605  604  static void
 606  605  compile_asm(char **tokens, int cnt)
 607  606  {
 608      -        char *parms[4];
 609  607          sym_t *symbols[4];
 610  608  #define EMIT(o, r, a, x, y) \
 611  609          fle.code[pc*2] =  ((x) << 10) | (y);                    \
 612  610          fle.code[pc*2+1] = ((o) << 20) | ((r) << 10) | a; pc++
 613  611  #define EMIT_AUDIGY(o, r, a, x, y) \
 614  612          fle.code[pc*2] =  ((x) << 12) | (y);                    \
 615  613          fle.code[pc*2+1] = ((o) << 24) | ((r) << 12) | a; pc++
 616  614  
 617      -        int i, n = 0, nerr = 0;
      615 +        int i, nerr = 0;
 618  616          int ninputs = 0;
 619  617  
 620  618          CHECK_COUNT(tokens, cnt, 5, 5);
 621  619  
 622  620          for (i = 0; i < 4; i++) {
 623  621                  if ((symbols[i] = find_symbol(tokens[i+1])) == NULL) {
 624  622                          (void) fprintf(stderr, "%s\n", tokens[i+1]);
 625  623                          nerr++;
 626  624                          error("Undefined symbol '%s'", tokens[i + 1]);
 627  625                          continue;
↓ open down ↓ 178 lines elided ↑ open up ↑
 806  804  
 807  805                  add_symbol("noise_L", SY_CONST, 0x058);
 808  806                  add_symbol("noise_R", SY_CONST, 0x059);
 809  807                  add_symbol("IRQREQ", SY_CONST, 0x05a);
 810  808          }
 811  809  }
 812  810  
 813  811  static void
 814  812  produce_map(char *name)
 815  813  {
 816      -        char fname[1024];
 817  814          int i;
 818  815          FILE *f;
 819  816  
 820  817          if ((f = fopen(name, "w")) == NULL) {
 821  818                  perror(name);
 822  819                  return;
 823  820          }
 824  821  
 825  822          (void) fprintf(f, "%d\n", pc);
 826  823  
↓ open down ↓ 123 lines elided ↑ open up ↑
 950  947          if (verbose) {
 951  948                  (void) fprintf(stderr,
 952  949                      "No errors detected - Header written to %s\n",
 953  950                      fname);
 954  951          }
 955  952  }
 956  953  
 957  954  int
 958  955  main(int argc, char *argv[])
 959  956  {
 960      -        char line[4096], *p, *s, *outfile;
 961      -        char *iline;
      957 +        char *outfile;
 962  958          int i;
 963  959          FILE *input;
 964  960          char *tokens[10];
 965  961          int tokcnt;
 966  962          char *mapfile = NULL;
 967  963          char *header = NULL;
 968  964          char *prefix = NULL;
 969  965  
 970  966          outfile = NULL;
 971  967          infile = NULL;
↓ open down ↓ 122 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX