Merge branch 'wip/pwithnall/wpointer-sign' into 'main'

ci: Specify -Wno-overlength-strings on macOS
gstdio: Do not pass wrong pointer types to FILETIME to unix conversion
build: Specify -Werror=pointer-sign

See merge request GNOME/glib!2807
This commit is contained in:
Marco Trevisan 2022-07-12 14:25:53 +00:00
commit df239b97fb
3 changed files with 13 additions and 3 deletions

View File

@ -437,6 +437,10 @@ macos:
needs: []
variables:
GIT_SUBMODULE_STRATEGY: normal
# libpcre2 gets built as a subproject, but the default Clang options on
# macOS limit string lengths to 4095B — pcre2_error.c has a string of length
# 4380B
CFLAGS: '-Wno-overlength-strings'
before_script:
- bash .gitlab-ci/show-execution-environment.sh
- pip3 install --user meson==0.60.1

View File

@ -319,6 +319,8 @@ _g_win32_fill_privatestat (const struct __stat64 *statbuf,
DWORD reparse_tag,
GWin32PrivateStat *buf)
{
gint32 nsec;
buf->st_dev = statbuf->st_dev;
buf->st_ino = statbuf->st_ino;
buf->st_mode = statbuf->st_mode;
@ -331,9 +333,12 @@ _g_win32_fill_privatestat (const struct __stat64 *statbuf,
buf->reparse_tag = reparse_tag;
buf->st_ctim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftCreationTime, &buf->st_ctim.tv_nsec);
buf->st_mtim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastWriteTime, &buf->st_mtim.tv_nsec);
buf->st_atim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastAccessTime, &buf->st_atim.tv_nsec);
buf->st_ctim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftCreationTime, &nsec);
buf->st_ctim.tv_nsec = nsec;
buf->st_mtim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastWriteTime, &nsec);
buf->st_mtim.tv_nsec = nsec;
buf->st_atim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastAccessTime, &nsec);
buf->st_atim.tv_nsec = nsec;
}
/* Read the link data from a symlink/mountpoint represented

View File

@ -484,6 +484,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'-Werror=declaration-after-statement',
'-Werror=implicit-function-declaration',
'-Werror=missing-prototypes',
'-Werror=pointer-sign',
]
warning_cxx_args = warning_common_args
warning_objc_args = warning_c_args