Clean-ups and fixes to compile with more warnings enabled and with g++.
[invirt/third/libt4.git] / rsm.cc
diff --git a/rsm.cc b/rsm.cc
index c766145..de37b5d 100644 (file)
--- a/rsm.cc
+++ b/rsm.cc
@@ -83,6 +83,8 @@
 #include "rsm_client.h"
 #include <unistd.h>
 
+rsm_state_transfer::~rsm_state_transfer() {}
+
 rsm::rsm(const string & _first, const string & _me) : primary(_first)
 {
     cfg = unique_ptr<config>(new config(_first, _me, this));
@@ -347,10 +349,15 @@ rsm_client_protocol::status rsm::client_invoke(string & r, rpc_protocol::proc_id
             partition1(rsm_mutex_lock);
         }
     }
+    LOG(setfill('0') << setw(2) << hex;
+        for (size_t i=0; i<req.size(); i++)
+            cerr << (unsigned int)(unsigned char)req[i];
+        cerr);
     execute(procno, req, r);
-    for (size_t i=0; i<r.size(); i++) {
-        LOG(hex << setfill('0') << setw(2) << (unsigned int)(unsigned char)r[i]);
-    }
+    LOG(setfill('0') << setw(2) << hex;
+        for (size_t i=0; i<r.size(); i++)
+            cerr << (unsigned int)(unsigned char)r[i];
+        cerr);
     last_myvs = vs;
     return rsm_client_protocol::OK;
 }