Hi How can i do this whitout any warning.
char *p2; p2 = strstr(rx_buf, "text/html"); *(p2++); //SENDTOSERVER.C(136): warning C275: expression with possibly no effect
//*(p2++);
volatile char *p2;
Ingvar, Why are you dereferencing the pointer? It's complaining that you're telling it to get the value at that pointers address and then promptly throwing it away. Just get rid of the * and leave it as p2++; and it will stop complaining.
Usually you WILL get in some kind of trouble if your code depend on case sensitivity. Thus it is a very bad idea to have a variable called 'p2'. anyhow, the general idea is to use variable names that describe the purpose, not SMS which is bad enough in text and even worse in code. erik
OK i didnt give you all code. The reason is the string i search. The string look like this text/html :1000000002005DC1FE42000020000074072527F5B4 :020010002722A5 :100013008017111D7F0D111D7F0A3099FDC2998F25 at the first search i find "text/html" next search is ":" when i found ":" i will increment the pointer so it points to "1000000002005DC1FE42000020000074072527F5B4"
Then just increment the pointer. Don't dereference it too. Side note: Do you need to also account for CR/LF?
Ingvar, I understand what you're doing. And I understand that you're trying to increment a pointer. Unless you're trying to increment the value stored AT the pointer location, however, the "*" symbol should not be involved. Again, just change
*(p2++);
p2++;
No i don't look for cr/lf