Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   warning: assignment discards qualifiers from pointer target type (http://www.go4expert.com/forums/warning-assignment-discards-qualifiers-t19774/)

Pokeglobe 16Oct2009 06:20

warning: assignment discards qualifiers from pointer target type
 
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?

xpi0t0s 16Oct2009 23:20

Re: warning: assignment discards qualifiers from pointer target type
 
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?


All times are GMT +5.5. The time now is 17:06.