From 970ac635b9f28be87f037da33f1e8ac57b89fd47 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 14 Jun 2012 15:30:25 -0700 Subject: [PATCH] snapshot: remove unused 'uc_link' context The 'currentContext' variable was never initialized, and so doesn't perform any useful functionality as a 'uc_link' address. Remove it. --- snapshot.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snapshot.cc b/snapshot.cc index 9a69a4b..d8eda7f 100644 --- a/snapshot.cc +++ b/snapshot.cc @@ -183,11 +183,10 @@ void initSnapShotLibrary(unsigned int numbackingpages, getcontext( &savedSnapshotContext ); if( !alreadySwapped ){ alreadySwapped = 1; - ucontext_t currentContext, swappedContext, newContext; + ucontext_t swappedContext, newContext; getcontext( &newContext ); newContext.uc_stack.ss_sp = sTheRecord->mStackBase; newContext.uc_stack.ss_size = STACK_SIZE_DEFAULT; - newContext.uc_link = ¤tContext; makecontext( &newContext, entryPoint, 0 ); swapcontext( &swappedContext, &newContext ); } -- 2.34.1