Thread: MALLOC function usage prob

  1. #16
    Registered User
    Join Date
    Aug 2008
    Posts
    15
    i've seen it nw and understood that it wont fail as you mentioned rather could make the maintenance difficult.

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by patil.vishwa View Post
    i've seen it nw and understood that it wont fail as you mentioned rather could make the maintenance difficult.
    Correct, the cast itself isn't what makes it fail - it is the lack of including the correct header-file. However, not including the correct header file does happen from time to time.

    If you are using an ANSI-compliant C compiler, it shouldn't complain about casting from void * to any other type. If you do get a warning or error, it is most likely because you are compiling with a C++ compiler.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #18
    Registered User
    Join Date
    Aug 2008
    Posts
    15
    Thanks a lot for the detailed explanation....!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM

Tags for this Thread