]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
common, examples, ggml : fix MSYS2 GCC compiler errors and warnings when building...
authorPeter <redacted>
Tue, 31 Dec 2024 00:46:06 +0000 (11:46 +1100)
committerGitHub <redacted>
Tue, 31 Dec 2024 00:46:06 +0000 (01:46 +0100)
commit6e1531aca5ed17f078973b4700fcdadbda4a34a5
tree2b32446b4b3638527fba1b374c25bdb8099ee385
parent716bd6dec3e044e5c325386b5b0483392b24cefe
common, examples, ggml : fix MSYS2 GCC compiler errors and warnings when building with LLAMA_CURL=ON and GGML_OPENCL=ON (#11013)

In common/common.cpp:
* Convert usage of stat() function call to check if file exists to standard library function std::filesystem::exists (error unable to match to correct function signature)
* Additional conditions to check if PATH_MAX is already defined in WIN32 environment (warning it is already defined in MSYS2)

In examples/run/run.cpp:
* Add io.h header inclusion (error cannot find function _get_osfhandle)
* Change initialisers for OVERLAPPED to empty struct (warning about uninitialised members)
* Add initialiser for hFile (warning it may be uninitialised)
* Add cast for curl_off_t percentage value to long int in generate_progress_prefix function (warning that curl_off_t is long long int)

In ggml/src/ggml-opencl/ggml-opencl.cpp:
* Initialise certain declared cl_mem variables to nullptr for greater safety (warning about B_d variable possibly used unassigned)
common/common.cpp
examples/run/run.cpp
ggml/src/ggml-opencl/ggml-opencl.cpp