libgnt/libgnt

Parents eed074767fad
Children f3b2baa52dff
Bump the minimum meson version to 0.56.0 and turn on additional warnings and fix them

Testing Done:
Compiled

Reviewed at https://reviews.imfreedom.org/r/1095/
  • +13 -2
    gntmain.c
  • +3 -4
    meson.build
  • --- a/gntmain.c Mon Oct 18 02:00:51 2021 -0500
    +++ b/gntmain.c Sun Oct 24 02:09:33 2021 -0500
    @@ -104,6 +104,11 @@
    guint timer;
    } escape_stuff;
    +static void
    +endwin_cb(G_GNUC_UNUSED gpointer data) {
    + endwin();
    +}
    +
    static gboolean
    escape_timeout(G_GNUC_UNUSED gpointer data)
    {
    @@ -469,6 +474,12 @@
    return FALSE;
    }
    +static gboolean
    +refresh_screen_cb(G_GNUC_UNUSED gpointer data)
    +{
    + return refresh_screen();
    +}
    +
    #ifndef _WIN32
    /* Xerox */
    static void
    @@ -567,7 +578,7 @@
    #ifdef SIGWINCH
    case SIGWINCH:
    erase();
    - g_idle_add((GSourceFunc)refresh_screen, NULL);
    + g_idle_add(refresh_screen_cb, NULL);
    if (org_winch_handler)
    org_winch_handler(sig);
    if (org_winch_handler_sa)
    @@ -901,7 +912,7 @@
    if (!g_spawn_async_with_pipes(wd, argv, envp,
    G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
    - (GSpawnChildSetupFunc)endwin, NULL,
    + endwin_cb, NULL,
    &pid, stin, stout, sterr, NULL))
    return FALSE;
    --- a/meson.build Mon Oct 18 02:00:51 2021 -0500
    +++ b/meson.build Sun Oct 24 02:09:33 2021 -0500
    @@ -28,7 +28,8 @@
    project('libgnt', 'c',
    license : 'GPL-2.0-or-later',
    version : '3.0.0-devel',
    - meson_version : '>=0.50.0')
    + meson_version : '>=0.56.0',
    + default_options : ['c_std=c99', 'warning_level=2'])
    gnt_soversion = 1
    parts = meson.project_version().split('-')
    @@ -311,9 +312,7 @@
    dependencies : [ncurses, glib],
    sources : libgnt_generated_targets)
    -if meson.version().version_compare('>=0.54.0')
    - meson.override_dependency('gnt3', libgnt_dep)
    -endif
    +meson.override_dependency('gnt3', libgnt_dep)
    subdir('wms')
    subdir('test')