Fixed some signed vs unsigned warnings in serial_sync.cpp.