changing where i cast 

moving the cast up to where the variable is declared  u = (size_t) ctx->request->upstream;