This variable is only used in CCAssert statements, which are compiled out in release builds.  Even though its assigned to several times, new versions of GCC will (rightly) warn that its value is never used, so all the assignments are pointless.

I think this is good use case for gcc's unused attribute (i,e, CC_UNUSED).

IIUC only other alternatives would be to globally disable this warning (not a good idea IMHO) or wrap all the use of 'prev' in "ifdef DEBUG".