1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

warning: assignment discards qualifiers from pointer target type

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

  1. Pokeglobe

    Pokeglobe New Member

    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

    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