clang

🧩 Syntax:
$ clang planet.c -o planet -lm -O2
planet.c:251:5: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
int min(x,y)
    ^
planet.c:255:5: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
int max(x,y)
    ^
planet.c:259:8: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
double fmin(x,y)
       ^
planet.c:263:8: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
double fmax(x,y)
       ^
planet.c:321:3: error: call to undeclared function 'setmode'; ISO C99 and later do not support
      implicit function declarations [-Wimplicit-function-declaration]
  setmode(fileno(outfile), O_BINARY);
  ^
planet.c:435:42: warning: passing arguments to 'print_error' without a prototype is deprecated in
      all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
                              print_error(do_file ? filename : "standard output",
                                         ^
planet.c:440:29: warning: passing arguments to 'print_error' without a prototype is deprecated in
      all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
                 print_error(do_file ? filename : "standard output",
                            ^
planet.c:446:18: warning: passing arguments to 'print_error' without a prototype is deprecated in
      all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      print_error(do_file ? filename : "standard output",
                 ^
planet.c:451:13: warning: passing arguments to 'readcolors' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  readcolors(colfile, colorsname);
            ^
planet.c:634:25: warning: passing arguments to 'log_2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  Depth = 3*((int)(log_2(scale*Height)))+6;
                        ^
planet.c:638:13: warning: passing arguments to 'rand2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  r1 = rand2(r1,r1);
            ^
planet.c:639:13: warning: passing arguments to 'rand2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  r2 = rand2(r1,r1);
            ^
planet.c:640:13: warning: passing arguments to 'rand2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  r3 = rand2(r1,r2);
            ^
planet.c:641:13: warning: passing arguments to 'rand2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  r4 = rand2(r2,r3);
            ^
planet.c:716:30: warning: passing arguments to 'makeoutline' without a prototype is deprecated in
      all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  if (do_outline) makeoutline(do_bw);
                             ^
planet.c:766:28: warning: passing arguments to 'printppmBW' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      if (do_bw) printppmBW(outfile);
                           ^
planet.c:767:20: warning: passing arguments to 'printppm' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      else printppm(outfile);
                   ^
planet.c:770:28: warning: passing arguments to 'printxpmBW' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      if (do_bw) printxpmBW(outfile);
                           ^
planet.c:771:20: warning: passing arguments to 'printxpm' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      else printxpm(outfile);
                   ^
planet.c:774:28: warning: passing arguments to 'printbmpBW' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      if (do_bw) printbmpBW(outfile);
                           ^
planet.c:775:20: warning: passing arguments to 'printbmp' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      else printbmp(outfile);
                   ^
planet.c:778:19: warning: passing arguments to 'printheights' without a prototype is deprecated in
      all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      printheights(outfile);
                  ^
planet.c:267:5: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
int main(ac,av)
    ^
planet.c:277:8: warning: a function declaration without a prototype is deprecated in all versions of
      C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent
      definition [-Wdeprecated-non-prototype]
  void readcolors();
       ^
planet.c:785:6: note: conflicting prototype is here
void readcolors(FILE *colfile, char* colorsname)
     ^
planet.c:278:19: warning: a function declaration without a prototype is deprecated in all versions
      of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent
      definition [-Wdeprecated-non-prototype]
  void readmap(), makeoutline(), smoothshades();
                  ^
planet.c:900:6: note: conflicting prototype is here
void makeoutline(int do_bw)
     ^
planet.c:1049:27: warning: passing arguments to 'log_2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
    Depth = 3*((int)(log_2(scale1*Height)))+3;
                          ^
planet.c:1052:14: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      planet0(cos(theta1)*cos2,y,-sin(theta1)*cos2, i,j);
             ^
planet.c:1079:31: warning: passing arguments to 'log_2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        Depth = 3*((int)(log_2(scale1*Height)))+3;
                              ^
planet.c:1082:18: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
          planet0(cos(theta1)*cos2,y,-sin(theta1)*cos2, i,j);
                 ^
planet.c:1112:31: warning: passing arguments to 'log_2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        Depth = 3*((int)(log_2(scale1*Height)))+3;
                              ^
planet.c:1115:18: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
          planet0(cos(theta1)*cos2,sin(y),-sin(theta1)*cos2, i,j);
                 ^
planet.c:1141:31: warning: passing arguments to 'log_2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        Depth = 3*((int)(log_2(scale1*Height)))+3;
                              ^
planet.c:1157:20: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
            planet0(x3,y3,z3, i,j);
                   ^
planet.c:1183:31: warning: passing arguments to 'log_2' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        Depth = 3*((int)(log_2(scale1*Height)))+3;
                              ^
planet.c:1194:20: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
            planet0(cos(theta1+theta2)*cos2,sin(y),-sin(theta1+theta2)*cos2,
                   ^
planet.c:1231:14: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      planet0(x1,y1,z1, i,j);
             ^
planet.c:1260:16: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        planet0(x1,y1,z1, i,j);
               ^
planet.c:1291:16: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        planet0(x1,y1,z1, i,j);
               ^
planet.c:1310:16: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        planet0(x1,y1,z1, i,j);
               ^
planet.c:1454:16: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        planet0(x1,y1,z1, i,j);
               ^
planet.c:1483:14: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      planet0(x1,y1,z1, i,j);
             ^
planet.c:1516:16: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
        planet0(x1,y1,z1, i,j);
               ^
planet.c:1557:20: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
            planet0(cos(theta1)*cos2,y,-sin(theta1)*cos2, i, j);
                   ^
planet.c:1590:20: warning: passing arguments to 'planet0' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
            planet0(cos(theta1)*cos2,y,-sin(theta1)*cos2, i, j);
                   ^
planet.c:1598:8: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
double rand2(p,q) /* random number generator taking two seeds */
       ^
planet.c:1613:16: warning: passing arguments to 'planet1' without a prototype is deprecated in all
      versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  alt = planet1(x,y,z);
               ^
planet.c:1606:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void planet0(x,y,z, i, j)
     ^
planet.c:1697:8: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
double planet(a,b,c,d, x,y,z, level)
       ^
planet.c:1855:8: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
double planet1(x,y,z)
       ^
planet.c:1911:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void printppm(outfile) /* prints picture in PPM (portable pixel map) format */
     ^
planet.c:1947:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void printppmBW(outfile) /* prints picture in b/w PPM format */
     ^
planet.c:1969:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void printbmp(outfile) /* prints picture in BMP format */
     ^
planet.c:2079:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void printbmpBW(outfile) /* prints picture in b/w BMP format */
     ^
planet.c:2210:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void printxpm(outfile) /* prints picture in XPM (X-windows pixel map) format */
     ^
planet.c:2241:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void printxpmBW(outfile) /* prints picture in XPM (X-windows pixel map) format */
     ^
planet.c:2273:6: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
void printheights(outfile) /* prints heightfield */
     ^
planet.c:2286:8: warning: a function definition without a prototype is deprecated in all versions of
      C and is not supported in C2x [-Wdeprecated-non-prototype]
double log_2(x)
       ^
planet.c:272:50: warning: a function declaration without a prototype is deprecated in all versions
      of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent
      definition [-Wdeprecated-non-prototype]
       printxpm(), printxpmBW(), printheights(), print_error();
                                                 ^
planet.c:2290:6: note: conflicting prototype is here
void print_error(char *filename, char *ext)
     ^
57 warnings and 1 error generated.