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
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.
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++;
View all questions in Keil forum