From 49f6d05e574d93406e917eaceab4c2cae3c6b350 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 18 Oct 2013 16:39:43 +1100 Subject: Avoid a spurious warning from Visual Studio 2013 Code Analysis. --- src/CellBuffer.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 855c62a1d..c05060865 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -190,6 +190,10 @@ const char *UndoHistory::AppendAction(actionType at, int position, const char *d } // See if current action can be coalesced into previous action // Will work if both are inserts or deletes and position is same +#if defined(_MSC_VER) && defined(_PREFAST_) + // Visual Studio 2013 Code Analysis wrongly believes actions can be NULL at its next reference + __analysis_assume(actions); +#endif if (currentAction == savePoint) { currentAction++; } else if (!actions[currentAction].mayCoalesce) { -- cgit v1.2.3