Build without warnings
authorbdemsky <bdemsky@uci.edu>
Thu, 15 Dec 2016 18:32:52 +0000 (10:32 -0800)
committerbdemsky <bdemsky@uci.edu>
Thu, 15 Dec 2016 18:32:52 +0000 (10:32 -0800)
cgoal.cc
change.cc
eprecord.cc
mcexecution.cc
mymemory.cc
schedulebuilder.cc

index 95c26ab3b1d56e5f1e2d219f246c324ad70d8859..6bd216fd62eb3f50bea472e52aae2165ed4432db 100644 (file)
--- a/cgoal.cc
+++ b/cgoal.cc
@@ -31,7 +31,7 @@ void CGoal::print() {
        model_print("goal: ");
        model_print("(");
        for(uint i=0;i<num;i++) {
        model_print("goal: ");
        model_print("(");
        for(uint i=0;i<num;i++) {
-               model_print("%lu",valarray[i]);
+               model_print("%llu",valarray[i]);
                if ((i+1)!=num)
                        model_print(", ");
        }
                if ((i+1)!=num)
                        model_print(", ");
        }
index 86de570d76ab437ba8476a083a3c6f7f77ad4182..55729d93beb5851a83626211447a40f36967877c 100644 (file)
--- a/change.cc
+++ b/change.cc
@@ -23,7 +23,7 @@ MCChange::~MCChange() {
 void MCChange::print() {
        record->print();
        model_print("(");
 void MCChange::print() {
        record->print();
        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) {
 }
 
 bool MCChangeEquals(MCChange *mcc1, MCChange *mcc2) {
index a87167eacd546be5d87c7c856324b87ce2630bf6..30ece3bb1d706803e32d4028aa4bac305737ab8a 100644 (file)
@@ -158,9 +158,9 @@ void EPRecord::print(int f) {
                                CGoal *goal=cit->next();
                                model_dprintf(f,"(");
                                for(uint i=0;i<getNumFuncInputs();i++) {
                                CGoal *goal=cit->next();
                                model_dprintf(f,"(");
                                for(uint i=0;i<getNumFuncInputs();i++) {
-                                       model_dprintf(f,"%lu ", goal->getValue(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;
                }
                        }
                        delete cit;
                }
@@ -174,7 +174,7 @@ void EPRecord::print(int f) {
                model_dprintf(f, "{");
 
                while(it->hasNext()) {
                model_dprintf(f, "{");
 
                while(it->hasNext()) {
-                       model_dprintf(f, "%lu ", it->next());
+                       model_dprintf(f, "%llu ", it->next());
                }
                model_dprintf(f, "}");
                delete it;
                }
                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,"{");
                while(it->hasNext()) {
                        uint64_t v=it->next();
-                       model_dprintf(f,"%lu ", v);
+                       model_dprintf(f,"%llu ", v);
                }
                model_dprintf(f,"}");
                delete it;
                }
                model_dprintf(f,"}");
                delete it;
index 573b0b2de0907fca36710561a2e96a315249e523..59ea44aeb34d6b091b004c8e9f55385c67862bbf 100644 (file)
@@ -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()) {
        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");
        }
                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()) {
        EPValue * epval=list->front();
        list->pop_front();
        if (DBG_ENABLED()) {
-               model_print("tid = %lu: ", tid);
+               model_print("tid = %d: ", tid);
        }
        doStore(epval);
 }
        }
        doStore(epval);
 }
@@ -323,7 +323,7 @@ void MCExecution::doStore(EPValue *epval) {
        uint64_t val=epval->getValue();
        int len=epval->getLen();
        if (DBG_ENABLED()) {
        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");
        }
                currexecpoint->print();
                model_print("\n");
        }
@@ -405,7 +405,7 @@ void MCExecution::store(void *addr, uint64_t val, int len) {
 #endif
 
        if (DBG_ENABLED()) {
 #endif
 
        if (DBG_ENABLED()) {
-               model_print("STORE *%p=%lu ", addr, val);
+               model_print("STORE *%p=%llu ", addr, val);
                currexecpoint->print();
                model_print("\n");
        }
                currexecpoint->print();
                model_print("\n");
        }
@@ -515,7 +515,7 @@ uint64_t MCExecution::load(const void *addr, int len) {
 #endif
 
        if (DBG_ENABLED()) {
 #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");
        }
                currexecpoint->print();
                model_print("\n");
        }
index bbddf7e2f100d9664231223f211a78538e7bb414..23f448f3b1dfefb04b2a55b96913adab54967f61 100644 (file)
@@ -239,12 +239,13 @@ void *malloc(size_t size)
 /** @brief Snapshotting free implementation for user programs */
 void free(void * ptr)
 {
 /** @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);
                }
                if (switch_alloc) {
                        model_free(ptr);
                } else {
                        mspace_free(user_snapshot_space, ptr);
                }
+       }
 }
 
 /** @brief Snapshotting realloc implementation for user programs */
 }
 
 /** @brief Snapshotting realloc implementation for user programs */
index 9e7d3debe71c6bc181ad5bc0da64b573e1fabf03..3bc6e96b2a729d6e1f0dac59922bf386901fa5d7 100644 (file)
@@ -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));
        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));
        }
        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));
        }
        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:
        }
        break;
        default: