Solve two warnings about int size
Added warning about a dangling pointer
Moved perf_timing code inside the PERF_TIMING macro