Thread: warning: assignment makes integer from pointer without a cast

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    192

    warning: assignment makes integer from pointer without a cast

    So im not really sure about this warning but

    basically i have a macro setup this is just how it is

    #define GetPortCount(...) NULL

    and theres part of a big program that call on it and it expects and integer

    nsdb_globals.portCount = GetPortCount ();

    so should i just ignore it since i already set the function as a macro or is there a way to slip by and not see that warning message

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Are you planning to replace GetPortCount() with something legitimate later? You should not set an integer to NULL.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. warning: cast to pointer from integer of different size
    By DavidDobson in forum C Programming
    Replies: 6
    Last Post: 12-03-2008, 06:37 PM
  2. Looking for constructive criticism
    By wd_kendrick in forum C Programming
    Replies: 16
    Last Post: 05-28-2008, 09:42 AM
  3. assignment makes pointer from integer
    By crescen7 in forum C Programming
    Replies: 4
    Last Post: 06-25-2002, 10:08 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 3
    Last Post: 01-14-2002, 12:13 PM