I have this code that is warning me
Code :
int handle_operation(char *b) {
char *buf = b;
uint16_t opcode;
memcpy(&opcode, buf, 2);
buf = buf += 2;
}
Warning :
warning: operation on ‘buf’ may be undefined [-Wsequence-point]
53 | buf = buf++;
My goal is to increment the buffer's pointer by x each time I memcpy x bytes of it somewhere.