Skip to content

Commit

Permalink
Fix mingw-gcc 'ordered comparison of pointer with integer zero' warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel committed Oct 10, 2013
1 parent 1ab97fe commit d51079d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/build.c
Expand Up @@ -842,7 +842,7 @@ static GPid build_spawn_cmd(GeanyDocument *doc, const gchar *cmd, const gchar *d
g_free(output[0]);
g_free(output[1]);
#else
if (build_info.pid > 0)
if (build_info.pid != 0)
{
g_child_watch_add(build_info.pid, (GChildWatchFunc) build_exit_cb, NULL);
build_menu_update(doc);
Expand Down

1 comment on commit d51079d

@elextr
Copy link
Member

@elextr elextr commented on d51079d Oct 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although GPid is a signed type on Linux, build_info.pid is always initialised to zero and nothing should return a value less than zero so this should be safe enough on Linux as well.

Please sign in to comment.