Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const compiler warnings #3

Open
countach opened this issue Nov 19, 2010 · 2 comments
Open

const compiler warnings #3

countach opened this issue Nov 19, 2010 · 2 comments

Comments

@countach
Copy link

Several places in the code where there are compiler warnings due to lack of const. e.g.

unsigned char const * p = octets->data;

Maybe the author doesn't know the trick of writing C consts. Read the C code right to left like this:

char const * const * const xxx;

You read this right to left to say "xxx is a constant pointer to a constant pointer to constant chars. Remember this trick, and you won't get confused with consts.

@Nonnus
Copy link

Nonnus commented Feb 6, 2011

i used
[ const unsgned char * p = octets->data; ]
and got rid of the errors

is it ok ?

@kgn
Copy link
Contributor

kgn commented Feb 11, 2011

This issue should be resolved now: 75f7b19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants