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 95c26ab..6bd216f 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("%lu",valarray[i]);
+               model_print("%llu",valarray[i]);
                if ((i+1)!=num)
                        model_print(", ");
        }
index 86de570..55729d9 100644 (file)
--- a/change.cc
+++ b/change.cc
@@ -23,7 +23,7 @@ MCChange::~MCChange() {
 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) {
index a87167e..30ece3b 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++) {
-                                       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;
                }
@@ -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;
index 573b0b2..59ea44a 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()) {
-               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");
        }
index bbddf7e..23f448f 100644 (file)
@@ -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 */
index 9e7d3de..3bc6e96 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));
-               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: