I think the fix is adding const
to the return type (to prevent modification of the contents).
I'd also change the if cascade to switch / case, but that's unrelated to the problem.
const char * str_convert(int op) {
/*returns the string corresponding to an operation opcode. Used for screen output.*/
switch (op) {
case ABS: return "abs";
case MAX: return "max";
case MIN: return "min";
case MOD: return "mod";
case MULT: return "mult";
case PLUS: return "plus";
case SUBS: return "subs";
default: return NULL;
}
}