Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: configure
run: ./autogen.sh
env:
CFLAGS: -fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -O2 -Wp,-D_FORTIFY_SOURCE=2
CFLAGS: -fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -O2 -Wp,-D_FORTIFY_SOURCE=2 -Werror
- name: Build flatpak
run: make -j $(getconf _NPROCESSORS_ONLN)
- name: Run tests
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
sudo apt-get install -y $(xargs < .github/dependencies.apt.txt)

- name: Configure flatpak-builder
run: meson setup --wrap-mode nodownload ${CONFIG_OPTS} ${BUILDDIR} .
run: meson setup --wrap-mode nodownload ${CONFIG_OPTS} -Dwerror=true ${BUILDDIR} .

- name: Build flatpak-builder with Meson
run: meson compile -C ${BUILDDIR}
Expand Down
11 changes: 11 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ foreach arg : project_c_args
endif
endforeach

if cc.get_id() == 'clang'
clang_args = [
'-Wno-typedef-redefinition',
]
foreach arg : clang_args
if cc.has_argument(arg)
add_project_arguments(arg, language: 'c')
endif
endforeach
endif

# The debugedit program is a hard dependency
debugedit = find_program('debugedit', version: '>= 5.0')

Expand Down
18 changes: 9 additions & 9 deletions src/builder-flatpak-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ flatpak_path_match_prefix (const char *pattern,
/* special case * at end */
if (c == 0)
{
char *tmp = strchr (string, '/');
const char *tmp = strchr (string, '/');
if (tmp != NULL)
return tmp;
return string + strlen (string);
Expand Down Expand Up @@ -1163,11 +1163,11 @@ flatpak_create_curl_session (const char *user_agent)
if (curl_session == NULL)
return NULL;

curl_easy_setopt (curl_session, CURLOPT_CONNECTTIMEOUT, 60);
curl_easy_setopt (curl_session, CURLOPT_FAILONERROR, 1);
curl_easy_setopt (curl_session, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt (curl_session, CURLOPT_MAXREDIRS, 50);
curl_easy_setopt (curl_session, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt (curl_session, CURLOPT_CONNECTTIMEOUT, 60L);
curl_easy_setopt (curl_session, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt (curl_session, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt (curl_session, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt (curl_session, CURLOPT_NOPROGRESS, 0L);
curl_easy_setopt (curl_session, CURLOPT_LOW_SPEED_TIME, 60L);
curl_easy_setopt (curl_session, CURLOPT_LOW_SPEED_LIMIT, 10000L);
curl_easy_setopt (curl_session, CURLOPT_USERAGENT, user_agent);
Expand Down Expand Up @@ -1633,7 +1633,7 @@ get_xdg_user_dir_from_string (const char *filesystem,
const char **suffix,
const char **dir)
{
char *slash;
const char *slash;
const char *rest;
g_autofree char *prefix = NULL;
gsize len;
Expand Down Expand Up @@ -2087,7 +2087,7 @@ option_add_generic_policy_cb (const gchar *option_name,
GError **error)
{
FlatpakContext *context = data;
char *t;
const char *t;
g_autofree char *key = NULL;
const char *policy_value;

Expand All @@ -2114,7 +2114,7 @@ option_remove_generic_policy_cb (const gchar *option_name,
GError **error)
{
FlatpakContext *context = data;
char *t;
const char *t;
g_autofree char *key = NULL;
const char *policy_value;
g_autofree char *extended_value = NULL;
Expand Down
4 changes: 2 additions & 2 deletions src/builder-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,10 +1117,10 @@ typedef struct {
} CURLWriteData;

static gsize
builder_curl_write_cb (gpointer *buffer,
builder_curl_write_cb (char *buffer,
gsize size,
gsize nmemb,
gpointer *userdata)
void *userdata)
{
gsize bytes_written;
CURLWriteData *write_data = (CURLWriteData *) userdata;
Expand Down