title: How do I handle these typedef's without warnings?
body: <p>I have some if statements to handle the value_type in different ways. If <code>INT</code> is defined then <code>value_type</code> is an integer, but if <code>CHAR</code> is defined <code>value_typ</code>e is a string. How can I handle this so I don' get any errors or warnings ?</p>
  
  <p>I defined <code>value_type</code> like this:</p>
  
  <pre><code>#ifdef INT
  typedef int value_type;
  #define TYPEMODE 1
  #endif
  
  #ifdef CHAR
  typedef char value_type[80];
  #define TYPEMODE -1
  #endif
  </code></pre>
  
  <p>I handled it like this in functions:</p>
  
  <pre><code>int functionName(value_type val) {
     if (TYPEMODE == 1) {
        val = 5;
     }
     if (TYPEMODE == -1) {
        strcpy(val, "hi");
     }
     return 0;
  }
  </code></pre>
  
  <p>If I define <code>INT</code> it gives me a warning for <code>strcpy</code>, if I define <code>CHAR</code> it gives me a warning for <code>val = 5</code>.</p>
  
  <p>Is there a better way to handle this that won't give me any warnings with <code>gcc -Wall file.c -o file</code>?</p>