emersion / slurp

Select a region in a Wayland compositor

Home Page:https://wayland.emersion.fr/slurp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#69 introduces an probably incorrect use of printf

colemickens opened this issue · comments

builder for '/nix/store/8i5sjh81ycam5dhhk0pgag9dwxzf8jbw-slurp-fdbca2426cd3220c4bbf7976ecae731d327a4fa2.drv' failed with exit code 1; last 10 log lines:
  build flags: -j8 -l8
  [17/18] Compiling C object slurp.p/main.c.o[K_protos.aon-generated_wlr-layer-shell-unstable-v1-protocol.c.o
  FAILED: slurp.p/main.c.o 
  gcc -Islurp.p -I. -I.. -I../include -I/nix/store/fn6sjqf47cgalkxgp7dmqi5grp9ifqdm-cairo-1.16.0-dev/include/cairo -I/nix/store/fwpg7xp5ka281nz4fqvyl8vl88gm1i8k-freetype-2.10.2-dev/include/freetype2 -I/nix/store/fwpg7xp5ka281nz4fqvyl8vl88gm1i8k-freetype-2.10.2-dev/include -I/nix/store/i1pj9jfalhgqqb6m60f1j42xb255slha-wayland-1.18.0/include -I/nix/store/x0y746yvgcxi4xsq3nlf37ivf8dnm7lj-libxkbcommon-0.10.0-dev/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c11 -Wno-unused-parameter -MD -MQ slurp.p/main.c.o -MF slurp.p/main.c.o.d -o slurp.p/main.c.o -c ../main.c
  ../main.c: In function 'main':
  ../main.c:997:3: error: format not a string literal and no format arguments [-Werror=format-security]
    997 |   printf(result_str);
        |   ^~~~~~
  cc1: all warnings being treated as errors

Ah, indeed. We need to printf("%s", result_str) instead. cc @grmat