title: Warnings in compilation
body: <p>I am trying to compile a simple program written in c on my new desktop. It installed completely normally without any error on my older machine but for some reason it is giving me lots of compilation warnings when I am trying to compile it here. I installed gcc, g++, xpm and xlib which are the pre requisites of this program. Could it be that I am missing some library or something on my new machine?
  Here are the warnings I get:</p>
  
  <pre><code>gcc -o view_qsfr qsfr_2005a_tool_box.c -lX11 -lm -lc -L/usr/X11R6/lib -lXpm
  In file included from qsfr_2005a_tool_box.c:44:0:
  qsfr_2005a_readQSFR.c: In function ‘Read_QSFR’:
  qsfr_2005a_readQSFR.c:706:19: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[201]’ [-Wformat=]
               scanf("%s",&amp;fname_extra);
                     ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotPaintAlignedString’:
  rotated.c:450:9: warning: return makes integer from pointer without a cast [-Wint-conversion]
    return NULL;
           ^
  rotated.c:453:36: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
       my_gc=XCreateGC(dpy, drawable, NULL, 0);
                                      ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c:510:45: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
    depth_one_gc=XCreateGC(dpy, empty_stipple, NULL, 0);
                                               ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c:566:43: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
     depth_one_gc=XCreateGC(dpy, new_bitmap, NULL, 0);
                                             ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotDrawHorizontalString’:
  rotated.c:670:36: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
       my_gc=XCreateGC(dpy, drawable, NULL, 0);
                                      ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotCreateTextItem’:
  rotated.c:982:36: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
       font_gc=XCreateGC(dpy, canvas, NULL, 0);
                                      ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotAddToLinkedList’:
  rotated.c:1240:18: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Wformat=]
       DEBUG_PRINT4("current cache size=%ld, new item=%ld, limit=%ld\n",
                    ^
  rotated.c:66:53: note: in definition of macro ‘DEBUG_PRINT4’
   #define DEBUG_PRINT4(a, b, c, d) if (debug) printf (a, b, c, d)
                                                       ^
  rotated.c:1253:15: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
    DEBUG_PRINT2("Removed %d bytes\n", i1-&gt;size);
                 ^
  rotated.c:64:47: note: in definition of macro ‘DEBUG_PRINT2’
   #define DEBUG_PRINT2(a, b) if (debug) printf (a, b)
                                                 ^
  In file included from qsfr_2005a_tool_box.c:45:0:
  qsfr_2005a_graphics.c: In function ‘initX’:
  qsfr_2005a_graphics.c:48:27: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
    gc=XCreateGC(display,win,NULL,NULL);
                             ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_tool_box.c:45:0:
  qsfr_2005a_graphics.c: In function ‘Plot_Correlation_Matrix’:
  qsfr_2005a_graphics.c:748:10: warning: implicit declaration of function ‘XpmWriteFileFromPixmap’ [-Wimplicit-function-declaration]
            XpmWriteFileFromPixmap(display, fname_out, pix, 0, NULL);
            ^
  qsfr_2005a_tool_box.c: At top level:
  qsfr_2005a_tool_box.c:413:4: warning: return type defaults to ‘int’ [-Wimplicit-int]
      main(int argc, char **argv)
      ^
  physics@XPHYS9G7XGC2LLT:~/Desktop/viewQSFR/viewQSFR$ sudo make
  gcc -o view_qsfr qsfr_2005a_tool_box.c -lX11 -lm -lc -L/usr/X11R6/lib -lXpm
  In file included from qsfr_2005a_tool_box.c:44:0:
  qsfr_2005a_readQSFR.c: In function ‘Read_QSFR’:
  qsfr_2005a_readQSFR.c:706:19: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[201]’ [-Wformat=]
               scanf("%s",&amp;fname_extra);
                     ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotPaintAlignedString’:
  rotated.c:450:9: warning: return makes integer from pointer without a cast [-Wint-conversion]
    return NULL;
           ^
  rotated.c:453:36: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
       my_gc=XCreateGC(dpy, drawable, NULL, 0);
                                      ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c:510:45: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
    depth_one_gc=XCreateGC(dpy, empty_stipple, NULL, 0);
                                               ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c:566:43: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
     depth_one_gc=XCreateGC(dpy, new_bitmap, NULL, 0);
                                             ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotDrawHorizontalString’:
  rotated.c:670:36: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
       my_gc=XCreateGC(dpy, drawable, NULL, 0);
                                      ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotCreateTextItem’:
  rotated.c:982:36: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
       font_gc=XCreateGC(dpy, canvas, NULL, 0);
                                      ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_graphics.c:8:0,
                   from qsfr_2005a_tool_box.c:45:
  rotated.c: In function ‘XRotAddToLinkedList’:
  rotated.c:1240:18: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Wformat=]
       DEBUG_PRINT4("current cache size=%ld, new item=%ld, limit=%ld\n",
                    ^
  rotated.c:66:53: note: in definition of macro ‘DEBUG_PRINT4’
   #define DEBUG_PRINT4(a, b, c, d) if (debug) printf (a, b, c, d)
                                                       ^
  rotated.c:1253:15: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
    DEBUG_PRINT2("Removed %d bytes\n", i1-&gt;size);
                 ^
  rotated.c:64:47: note: in definition of macro ‘DEBUG_PRINT2’
   #define DEBUG_PRINT2(a, b) if (debug) printf (a, b)
                                                 ^
  In file included from qsfr_2005a_tool_box.c:45:0:
  qsfr_2005a_graphics.c: In function ‘initX’:
  qsfr_2005a_graphics.c:48:27: warning: passing argument 3 of ‘XCreateGC’ makes integer from pointer without a cast [-Wint-conversion]
    gc=XCreateGC(display,win,NULL,NULL);
                             ^
  In file included from qsfr_2005a_graphics.c:7:0,
                   from qsfr_2005a_tool_box.c:45:
  /usr/include/X11/Xlib.h:1584:11: note: expected ‘long unsigned int’ but argument is of type ‘void *’
   extern GC XCreateGC(
             ^
  In file included from qsfr_2005a_tool_box.c:45:0:
  qsfr_2005a_graphics.c: In function ‘Plot_Correlation_Matrix’:
  qsfr_2005a_graphics.c:748:10: warning: implicit declaration of function ‘XpmWriteFileFromPixmap’ [-Wimplicit-function-declaration]
            XpmWriteFileFromPixmap(display, fname_out, pix, 0, NULL);
            ^
  qsfr_2005a_tool_box.c: At top level:
  qsfr_2005a_tool_box.c:413:4: warning: return type defaults to ‘int’ [-Wimplicit-int]
      main(int argc, char **argv)
  </code></pre>