You have already worked out the problem you commented the offending line out in the second example.
sor = c - '0';
Its going to throw warnings with all but the slackest compiler settings.
The error is correct because the result value can go negative if c is small, which has no meaning to the original type being a char. In laymans term you subtracted two oranges and got an apple.
You have two correct fixes to that line of code.
1.) sor need to be an unsigned type that covers the range of char so unsigned char, unsigned int, unsigned long would all work.
2.) The other solution is to IMPLICIT TYPECAST the subtraction so the compiler knows you actually mean to do that and have allowed for a negative if it occurs.
sor = (int)(C-'0');
You are trying to learn to be a programmer so learn types and there rules. The rejection of your code was correct on every ground. It isn't clear to anyone or the uni lexx checker that you know what you are doing and have accounted for it. There is a lot that can go wrong with that line of code in the wrong situation.
What it tells me is you are running your compiler on very loose settings and I suggest you turn the error level up to max and actually bother to remove the warnings that get thrown up. Those warnings contain dangers and in the student setting especially code submitted should contain zero warnings.
For the record the checker will never pick off malloc/free issues that requires real intelligence of what the code is doing when it runs. There are specific tools we use for memory leak and no tool is perfect at it because the order and timings can matter. So perhaps learn not to scoff at something you don't understand.