Skip to content

Commit

Permalink
Return something in non-void function (#70)
Browse files Browse the repository at this point in the history
Return NULL in `background_thread`, as
the return type is `gpointer`.

Fixes this error in a `-Wall -Werror` build:

    cpdb-frontend.c: In function 'background_thread':
    cpdb-frontend.c:465:1: error: control reaches end of non-void function [-Werror=return-type]
      465 | }
          | ^
  • Loading branch information
michaelweghorn authored Oct 15, 2024
1 parent 0033911 commit 423a614
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpdb/cpdb-frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ gpointer background_thread(gpointer user_data) {
if (f->stop_flag) break;
cpdbActivateBackends(f);
}
return NULL;
}

// Start the background thread
Expand Down

0 comments on commit 423a614

Please sign in to comment.