Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/FileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int FileUtils::fileMode(const char* path) throw (IOException)
{
throw IOException("Error reading file permissions for " + std::string(path));
}
return fileInfo.st_mode;
return *reinterpret_cast<int*>(&fileInfo.st_mode);
#else
// not implemented for Windows
return 0;
Expand Down
8 changes: 6 additions & 2 deletions src/UpdateDialogGtkFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ UpdateDialogGtk* (*update_dialog_gtk_new)() = 0;

bool extractFileFromBinary(int fd, const void* buffer, size_t length)
{
size_t count = write(fd,buffer,length);
return count >= length;
ssize_t count = write(fd,buffer,length);
if(count < 0)
{
return false;
}
return static_cast<size_t>(count) >= length;
}

UpdateDialog* UpdateDialogGtkFactory::createDialog()
Expand Down