Skip to content
Snippets Groups Projects

Backport to 1.1.x: Fix sentinel errors for builds against musl libc

Merged Petr Vaněk requested to merge arkamar/inkscape:sentinel-1.1.x into 1.1.x

This is backport of MR !3377 (merged) to 1.1.x version.

Edited by Petr Vaněk

Merge request reports

Merge request pipeline #331558280 failed

Merge request pipeline failed for f559db2b

Merged by Patrick StorzPatrick Storz 3 years ago (Jul 4, 2021 7:04pm UTC)

Loading

Pipeline #331579651 passed

Pipeline passed for f559db2b on 1.1.x

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Petr Vaněk changed title from Backport Fix sentinel errors for builds against musl libc to 1.1.x to Backport to 1.1.x: Fix sentinel errors for builds against musl libc

    changed title from Backport Fix sentinel errors for builds against musl libc to 1.1.x to Backport to 1.1.x: Fix sentinel errors for builds against musl libc

  • It seems you missed some NULLs in the merged MR (build currently fails). Can you look into that and update this MR accordingly please?

  • Yeah, it was missing

    diff --git a/src/ui/widget/paint-selector.cpp b/src/ui/widget/paint-selector.cpp
    index 3d28e25148..e57d3de09a 100644
    --- a/src/ui/widget/paint-selector.cpp
    +++ b/src/ui/widget/paint-selector.cpp
    @@ -902,7 +902,7 @@ void PaintSelector::set_mode_mesh(PaintSelector::Mode mode)
                 GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
                 gtk_cell_renderer_set_padding(renderer, 2, 0);
                 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, TRUE);
    -            gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), renderer, "text", COMBO_COL_LABEL, NULL);
    +            gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), renderer, "text", COMBO_COL_LABEL, nullptr);
     
                 ink_mesh_menu(combo);
                 g_signal_connect(G_OBJECT(combo), "changed", G_CALLBACK(PaintSelector::mesh_change), this);
    @@ -971,7 +971,7 @@ SPMeshGradient *PaintSelector::getMeshGradient()
     
             gchar *mesh_name;
             if (stockid) {
    -            mesh_name = g_strconcat("urn:inkscape:mesh:", meshid, NULL);
    +            mesh_name = g_strconcat("urn:inkscape:mesh:", meshid, nullptr);
             } else {
                 mesh_name = g_strdup(meshid);
             }

    :/

  • Author Contributor

    oh, sorry for that :/ I'll fix it. But -Wstrict-null-sentinel does exactly what I wanted :)

  • Petr Vaněk added 2 commits

    added 2 commits

    • d8c14cb4 - Fix sentinel errors for builds against musl libc
    • f77a70c7 - Enable -Wstrict-null-sentinel by default for GCC

    Compare with previous version

  • Author Contributor

    FP with a squashed fix from !3379 (merged).

  • Petr Vaněk marked this merge request as draft

    marked this merge request as draft

  • Author Contributor

    There are still some issues with this in master, I'll mark this as ready when they will be resolved and this MR will be updated appropriatelly.

  • Petr Vaněk added 2 commits

    added 2 commits

    • 8d8d7adb - Fix sentinel errors for builds against musl libc
    • f559db2b - Enable -Wstrict-null-sentinel by default for GCC

    Compare with previous version

  • Petr Vaněk marked this merge request as ready

    marked this merge request as ready

  • Author Contributor

    FP with another squashed fix from !3380 (merged). It should be ready to merge.

  • merged

  • Thanks!

Please register or sign in to reply
Loading