ezquake-source icon indicating copy to clipboard operation
ezquake-source copied to clipboard

BUG: compile error: error: passing arguments of pcre2_substring_list_free

Open Eonfge opened this issue 1 year ago • 1 comments

Please search for existing issues and check for potential duplicates before filing yours.

ezQuake version:

url: https://github.com/ezQuake/ezquake-source
tag: 3.6.4
commit: 3925ba3d48cd4a03dfdaa3d29e4d79dc3b2c90b2

OS/device including version: Flathub, FreeDesktop SDK 24.08

Describe the bug

src/sv_mod_frags.c: In function ‘parse_mod_string’:
src/sv_mod_frags.c:181:51: error: passing argument 1 of ‘pcre2_substring_list_free_8’ from incompatible pointer type [-Wincompatible-pointer-types]
  181 |                         pcre2_substring_list_free((const PCRE2_UCHAR8**)buf);
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   const PCRE2_UCHAR8 ** {aka const unsigned char **}
In file included from src/sv_mod_frags.c:33:
/usr/include/pcre2.h:952:1: note: expected ‘PCRE2_UCHAR8 **’ {aka ‘unsigned char **’} but argument is of type ‘const PCRE2_UCHAR8 **’ {aka ‘const unsigned char **’}
  952 | PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
      | ^
make: *** [Makefile:630: .ezquake/src/sv_mod_frags.o] Error 1

To Reproduce Pipeline can be found here: https://github.com/flathub/io.github.ezQuake/pull/31

If you want to reproduce this locally, this is a short script that does it all for you

#!/usr/bin/env bash
set -euo pipefail

clear
flatpak-builder --repo=testing-repo --force-clean build-dir io.github.ezQuake .yaml
flatpak --user remote-add --if-not-exists --no-gpg-verify ezquake-testing-repo testing-repo
flatpak --user install ezquake-testing-repo io.github.ezQuake -y
flatpak --user install ezquake-testing-repo io.github.ezQuake.Debug -y
flatpak update -y

Eonfge avatar Sep 11 '24 07:09 Eonfge

Prev context, due to a change of defaulting to error in gcc 14. Obviously wrong ofc, just why it has survived there.

https://discord.com/channels/166866762787192833/179895022366228481/1270232147008946298

dsvensson avatar Sep 11 '24 13:09 dsvensson