1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

warning: assignment discards qualifiers from pointer target type

Discussion in 'C' started by Pokeglobe, Oct 16, 2009.

  1. Pokeglobe

    Pokeglobe New Member

    Joined:
    Sep 28, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi , I am writing a code for someone. This isn't a big problem but it shows up and if I release my source It wont look professional.

    on Make
    Code:
    warning: assignment discards qualifiers from pointer target type
    code affected
    Code:
    p_cr = WZD_CONTENTS(p_wzd);
    Is there something wrong?
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    Code with warnings is not necessarily "unprofessional". Most code has warnings, the common way of suppressing those warnings is with casts, which are risky, and arguably just as "unprofessional" as allowing the warning through, because warnings are helpful in investigating possible issues with the code.

    What are the definitions of p_cr, WZD_CONTENTS and p_wzd?
     

Share This Page