Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #29

Open
yanwh0311 opened this issue Nov 20, 2021 · 2 comments
Open

Compile error #29

yanwh0311 opened this issue Nov 20, 2021 · 2 comments

Comments

@yanwh0311
Copy link

platform: archlinux-amd64

==> Starting build()...
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wno-deprecated-declarations -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o surfer surfer.c
pkg-config --cflags --libs libnotify gtk+-3.0 glib-2.0 webkit2gtk-4.0
-DEXTENSION_DIR="/usr/lib/surfer/"
-DDEBUG=0 -lm
surfer.c: In function ‘permission_request_cb’:
surfer.c:652:49: error: format not a string literal and no format arguments [-Werror=format-security]
652 | msg);
| ^~~
In file included from /usr/include/glib-2.0/glib.h:62,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:8,
from /usr/include/gtk-3.0/gdk/gdk.h:30,
from surfer.c:25:
surfer.c: In function ‘png_finished’:
surfer.c:1611:18: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘GError *’ {aka ‘struct _GError *’} [-Wformat=]
1611 | g_error( "error creating snapshot: %s",error );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
| |
| GError * {aka struct _GError *}
/usr/include/glib-2.0/glib/gmessages.h:337:32: note: in definition of macro ‘g_error’
337 | VA_ARGS);
| ^~~~~~~~~~~
surfer.c:1611:45: note: format string is defined here
1611 | g_error( "error creating snapshot: %s",error );
| ~^
| |
| char *
cc1: some warnings being treated as errors
make: *** [Makefile:18: surfer] Error 1
==> ERROR: A failure occurred in build().
Aborting...
error: failed to build 'surfer-git-4-0':
error: packages failed to build: surfer-git-4-0

@nihilowy
Copy link
Owner

now seems ok

@nihilowy
Copy link
Owner

but I recommend compilling from git clone ,and then make . it is more stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants