roddi / ValidateStoreReceipt

validate the receipt a well-known computer company's application store sends
355 stars 37 forks source link

const compiler warnings #3

Open countach opened 14 years ago

countach commented 14 years ago

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 commented 13 years ago

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

is it ok ?

kgn commented 13 years ago

This issue should be resolved now: https://github.com/roddi/ValidateStoreReceipt/commit/75f7b199f8cc2c5194b49ec8421dd2430182745d