Here is a patch with the changes I made to Basis v1.16.3 so I could use it in libktx. The warnings should be fixed for everyone's sake. The other things I leave to your judgement. GitHub doesn't support uploading .patch files to issues so I'm pasting it here.
The changes in basisu_enc.cpp remove the various file loaders because they are not used by libktx. These are all ifndef'ed LIBKTX.
The change in basisu_frontend.cpp fixes a warning that the items I've removed aren't used in the closure.
The changes in basisu_opencl.cpp remove all the printfs to stdout. Because many of libktx's clients can write their data to stdout, this is a no-no. These are ifndef'ed LIBKTX. A further change removes the error condition when a GPU device is not found. This is because CI VM's usually don't have GPUs so to run tests in CI you need to use a CPU device. I've put an #if 0 around the call to ocl_error_printf. Note that if this function is called in Debug configuration it throws an assert so this is not just a question of removing the message.
The changes in jpgd.cpp and basisu_transcoder.cpp are to quiet warnings.
For reasons related to how I incorporate code from the BasisU repo into KTX-Software, it is not easy for me to make a PR. Sorry.
Here is a patch with the changes I made to Basis v1.16.3 so I could use it in libktx. The warnings should be fixed for everyone's sake. The other things I leave to your judgement. GitHub doesn't support uploading .patch files to issues so I'm pasting it here.
The changes in
basisu_enc.cpp
remove the various file loaders because they are not used by libktx. These are all ifndef'ed LIBKTX.The change in
basisu_frontend.cpp
fixes a warning that the items I've removed aren't used in the closure.The changes in
basisu_opencl.cpp
remove all the printfs to stdout. Because many of libktx's clients can write their data to stdout, this is a no-no. These are ifndef'ed LIBKTX. A further change removes the error condition when a GPU device is not found. This is because CI VM's usually don't have GPUs so to run tests in CI you need to use a CPU device. I've put an#if 0
around the call toocl_error_printf
. Note that if this function is called in Debug configuration it throws an assert so this is not just a question of removing the message.The changes in
jpgd.cpp
and basisu_transcoder.cpp are to quiet warnings.For reasons related to how I incorporate code from the BasisU repo into KTX-Software, it is not easy for me to make a PR. Sorry.