diff --git a/library/Console-posix.cpp b/library/Console-posix.cpp index e68923f0e..ef74e67d2 100644 --- a/library/Console-posix.cpp +++ b/library/Console-posix.cpp @@ -635,7 +635,7 @@ namespace DFHack prompt_refresh(); break; case 11: // Ctrl+k, delete from current to end of line. - if (raw_cursor < raw_buffer.size()) + if (size_t(raw_cursor) < raw_buffer.size()) yank_buffer = raw_buffer.substr(raw_cursor); raw_buffer.erase(raw_cursor); prompt_refresh(); @@ -651,7 +651,7 @@ namespace DFHack case 20: // Ctrl+t, transpose current and previous characters if (raw_buffer.size() >= 2 && raw_cursor > 0) { - if (raw_cursor == raw_buffer.size()) + if (size_t(raw_cursor) == raw_buffer.size()) raw_cursor--; std::swap(raw_buffer[raw_cursor - 1], raw_buffer[raw_cursor]); raw_cursor++; diff --git a/library/modules/Job.cpp b/library/modules/Job.cpp index eccb70b7e..7673737b2 100644 --- a/library/modules/Job.cpp +++ b/library/modules/Job.cpp @@ -508,7 +508,7 @@ bool DFHack::Job::removePostings(df::job *job, bool remove_all) bool removed = false; if (!remove_all) { - if (job->posting_index >= 0 && job->posting_index < world->jobs.postings.size()) + if (job->posting_index >= 0 && size_t(job->posting_index) < world->jobs.postings.size()) { world->jobs.postings[job->posting_index]->flags.bits.dead = true; removed = true; diff --git a/library/modules/Screen.cpp b/library/modules/Screen.cpp index 96f385d8d..6ac39aa05 100644 --- a/library/modules/Screen.cpp +++ b/library/modules/Screen.cpp @@ -511,8 +511,8 @@ void PenArray::draw(unsigned int x, unsigned int y, unsigned int width, unsigned { for (unsigned int gridy = y; gridy < y + height; gridy++) { - if (gridx >= gps->dimx || - gridy >= gps->dimy || + if (gridx >= unsigned(gps->dimx) || + gridy >= unsigned(gps->dimy) || gridx - x + bufx >= dimx || gridy - y + bufy >= dimy) continue;