From: bdemsky Date: Thu, 15 Dec 2016 18:32:52 +0000 (-0800) Subject: Build without warnings X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satcheck.git;a=commitdiff_plain;h=dda2d5d103b32f8505374712936af1daf42ec061;hp=4e8a7fe4f03effc4895ec66cd3662c2ed8ebb6fa Build without warnings --- diff --git a/cgoal.cc b/cgoal.cc index 95c26ab..6bd216f 100644 --- a/cgoal.cc +++ b/cgoal.cc @@ -31,7 +31,7 @@ void CGoal::print() { model_print("goal: "); model_print("("); for(uint i=0;iprint(); model_print("("); - model_print("index=%u, val=%lu)\n", index, val); + model_print("index=%u, val=%llu)\n", index, val); } bool MCChangeEquals(MCChange *mcc1, MCChange *mcc2) { diff --git a/eprecord.cc b/eprecord.cc index a87167e..30ece3b 100644 --- a/eprecord.cc +++ b/eprecord.cc @@ -158,9 +158,9 @@ void EPRecord::print(int f) { CGoal *goal=cit->next(); model_dprintf(f,"("); for(uint i=0;igetValue(i+VC_BASEINDEX)); + model_dprintf(f,"%llu ", goal->getValue(i+VC_BASEINDEX)); } - model_dprintf(f,"=> %lu)", goal->getOutput()); + model_dprintf(f,"=> %llu)", goal->getOutput()); } delete cit; } @@ -174,7 +174,7 @@ void EPRecord::print(int f) { model_dprintf(f, "{"); while(it->hasNext()) { - model_dprintf(f, "%lu ", it->next()); + model_dprintf(f, "%llu ", it->next()); } model_dprintf(f, "}"); delete it; @@ -185,7 +185,7 @@ void EPRecord::print(int f) { model_dprintf(f,"{"); while(it->hasNext()) { uint64_t v=it->next(); - model_dprintf(f,"%lu ", v); + model_dprintf(f,"%llu ", v); } model_dprintf(f,"}"); delete it; diff --git a/mcexecution.cc b/mcexecution.cc index 573b0b2..59ea44a 100644 --- a/mcexecution.cc +++ b/mcexecution.cc @@ -212,7 +212,7 @@ uint64_t MCExecution::rmw(enum atomicop op, void *addr, uint len, uint64_t currv uint64_t newval; uint64_t retval=dormwaction(op, addr, len, currval, oldval, valarg, &newval); if (DBG_ENABLED()) { - model_print("RMW %p oldval=%lu valarg=%lu retval=%lu", addr, oldval, valarg, retval); + model_print("RMW %p oldval=%llu valarg=%llu retval=%llu", addr, oldval, valarg, retval); currexecpoint->print(); model_print("\n"); } @@ -313,7 +313,7 @@ void MCExecution::doStore(thread_id_t tid) { EPValue * epval=list->front(); list->pop_front(); if (DBG_ENABLED()) { - model_print("tid = %lu: ", tid); + model_print("tid = %d: ", tid); } doStore(epval); } @@ -323,7 +323,7 @@ void MCExecution::doStore(EPValue *epval) { uint64_t val=epval->getValue(); int len=epval->getLen(); if (DBG_ENABLED()) { - model_print("flushing %d bytes *(%p) = %lu", len, addr, val); + model_print("flushing %d bytes *(%p) = %llu", len, addr, val); currexecpoint->print(); model_print("\n"); } @@ -405,7 +405,7 @@ void MCExecution::store(void *addr, uint64_t val, int len) { #endif if (DBG_ENABLED()) { - model_print("STORE *%p=%lu ", addr, val); + model_print("STORE *%p=%llu ", addr, val); currexecpoint->print(); model_print("\n"); } @@ -515,7 +515,7 @@ uint64_t MCExecution::load(const void *addr, int len) { #endif if (DBG_ENABLED()) { - model_print("%lu(mid=%u)=LOAD %p ", val, id_retval, addr); + model_print("%llu(mid=%u)=LOAD %p ", val, id_retval, addr); currexecpoint->print(); model_print("\n"); } diff --git a/mymemory.cc b/mymemory.cc index bbddf7e..23f448f 100644 --- a/mymemory.cc +++ b/mymemory.cc @@ -239,12 +239,13 @@ void *malloc(size_t size) /** @brief Snapshotting free implementation for user programs */ void free(void * ptr) { - if (!DontFree(ptr)) + if (!DontFree(ptr)) { if (switch_alloc) { model_free(ptr); } else { mspace_free(user_snapshot_space, ptr); } + } } /** @brief Snapshotting realloc implementation for user programs */ diff --git a/schedulebuilder.cc b/schedulebuilder.cc index 9e7d3de..3bc6e96 100644 --- a/schedulebuilder.cc +++ b/schedulebuilder.cc @@ -31,20 +31,20 @@ void neatPrint(EPRecord *r, ConstGen *cgen, bool *satsolution) { case LOAD: { StoreLoadSet * sls=cgen->getStoreLoadSet(r); model_print("address=%p ", sls->getAddressEncoding(cgen, r, satsolution)); - model_print("rd=%lu ", sls->getValueEncoding(cgen, r, satsolution)); + model_print("rd=%llu ", sls->getValueEncoding(cgen, r, satsolution)); } break; case STORE: { StoreLoadSet * sls=cgen->getStoreLoadSet(r); model_print("address=%p ", sls->getAddressEncoding(cgen, r, satsolution)); - model_print("wr=%lu ", sls->getValueEncoding(cgen, r, satsolution)); + model_print("wr=%llu ", sls->getValueEncoding(cgen, r, satsolution)); } break; case RMW: { StoreLoadSet * sls=cgen->getStoreLoadSet(r); model_print("address=%p ", sls->getAddressEncoding(cgen, r, satsolution)); - model_print("rd=%lu ", sls->getRMWRValueEncoding(cgen, r, satsolution)); - model_print("wr=%lu ", sls->getValueEncoding(cgen, r, satsolution)); + model_print("rd=%llu ", sls->getRMWRValueEncoding(cgen, r, satsolution)); + model_print("wr=%llu ", sls->getValueEncoding(cgen, r, satsolution)); } break; default: