Skip to content

tests: Improve 4GB file loading test to work on i386

Philip Withnall requested to merge wip/pwithnall/file-load-contents-i386 into main

This should test the limits of loading 4GB files on i386 platforms, such as the Hurd CI runner. On such platforms, sizeof(size_t) == 4.

This should fix the compiler warning from https://gitlab.gnome.org/GNOME/glib/-/jobs/3989442:

../gio/tests/file.c:2931:51: error: left shift count >= width of type [-Werror=shift-count-overflow]
 2931 | static const gsize testfile_4gb_size = ((gsize) 1 << 32) + (1 << 16); /* 4GB + a bit */
      |                                                   ^~
cc1: all warnings being treated as errors

Signed-off-by: Philip Withnall pwithnall@gnome.org

Merge request reports

Loading