Fixed data types

This commit is contained in:
Uwe Seimet 2021-07-19 10:40:26 +02:00
parent d85af02c50
commit f29626e58f
3 changed files with 6 additions and 2 deletions

View File

@ -1116,6 +1116,8 @@ int startrascsi(void)
int main(int argc, char* argv[])
{
#endif // BAREMETAL
GOOGLE_PROTOBUF_VERIFY_VERSION;
int i;
int actid;
DWORD now;

View File

@ -82,6 +82,8 @@ BOOL SendCommand(const char *hostname, const Command& command)
//---------------------------------------------------------------------------
int main(int argc, char* argv[])
{
GOOGLE_PROTOBUF_VERIFY_VERSION;
// Display help
if (argc < 2) {
cerr << "SCSI Target Emulator RaSCSI Controller" << endl;

View File

@ -25,7 +25,7 @@ using namespace std;
void SerializeProtobufData(int fd, const string& data)
{
// Write the size of the protobuf data as a header
ssize_t size = data.length();
int32_t size = data.length();
if (write(fd, &size, sizeof(size)) != sizeof(size)) {
throw ioexception("Cannot write protobuf header");
}
@ -45,7 +45,7 @@ void SerializeProtobufData(int fd, const string& data)
string DeserializeProtobufData(int fd)
{
// First read the header with the size of the protobuf data
size_t size;
int32_t size;
if (read(fd, &size, sizeof(int)) != sizeof(int)) {
// No more data
return "";