Skip to content

Commit

Permalink
fix format warning and add -Werror
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed May 21, 2024
1 parent 2fa7968 commit 8f1caa2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ endif

# disable vala related warnings
args += ['-Wno-unused', '-Wno-unused-result', '-Wno-incompatible-pointer-types',
'-Wno-discarded-qualifiers', '-Wno-infinite-recursion', '-Wall', '-Wextra'
'-Wno-discarded-qualifiers', '-Wno-infinite-recursion',
'-Wno-cast-function-type'
]

# some compiler flags from dpkg-buildpackage
Expand All @@ -40,6 +41,10 @@ args += ['-g', '-O2', '-Werror=implicit-function-declaration',
'-fcf-protection'
]

# error on warning

args += ['-Werror']

libc_srcs = []

start_code = []
Expand Down
2 changes: 1 addition & 1 deletion src/util/file.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public string readfile_byte (string path, uint64 n) {
warning (_ ("File is empty: %s").printf (path));
return "";
}else if (size < n) {
warning (_ ("Read byte size is bigger than file size: %s (read: %lld size %lld)").printf (path, n, size));
warning (_ ("Read byte size is bigger than file size: %s (read: %" + uint64.FORMAT + " size: %" + uint64.FORMAT+")").printf (path, n, size));
return "";
}else if (n == 0) {
n = size;
Expand Down

0 comments on commit 8f1caa2

Please sign in to comment.