~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getopt.c

  • Committer: Brian Aker
  • Date: 2008-07-14 16:24:25 UTC
  • Revision ID: brian@tangent.org-20080714162425-juw3vw221gs9kysh
Cleanup around intptr_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
992
992
    /*
993
993
      Do not clear variable value if it has no default value.
994
994
      The default value may already be set.
995
 
      NOTE: To avoid compiler warnings, we first cast int64_t to intptr,
 
995
      NOTE: To avoid compiler warnings, we first cast int64_t to intptr_t,
996
996
      so that the value has the same size as a pointer.
997
997
    */
998
 
    if ((char*) (intptr) value)
999
 
      *((char**) variable)= (char*) (intptr) value;
 
998
    if ((char*) (intptr_t) value)
 
999
      *((char**) variable)= (char*) (intptr_t) value;
1000
1000
    break;
1001
1001
  case GET_STR_ALLOC:
1002
1002
    /*
1003
1003
      Do not clear variable value if it has no default value.
1004
1004
      The default value may already be set.
1005
 
      NOTE: To avoid compiler warnings, we first cast int64_t to intptr,
 
1005
      NOTE: To avoid compiler warnings, we first cast int64_t to intptr_t,
1006
1006
      so that the value has the same size as a pointer.
1007
1007
    */
1008
 
    if ((char*) (intptr) value)
 
1008
    if ((char*) (intptr_t) value)
1009
1009
    {
1010
1010
      my_free((*(char**) variable), MYF(MY_ALLOW_ZERO_PTR));
1011
 
      *((char**) variable)= my_strdup((char*) (intptr) value, MYF(MY_WME));
 
1011
      *((char**) variable)= my_strdup((char*) (intptr_t) value, MYF(MY_WME));
1012
1012
    }
1013
1013
    break;
1014
1014
  default: /* dummy default to avoid compiler warnings */