Fix compiler warnings

This commit is contained in:
Lawrence Lee 2024-11-17 15:39:07 -08:00
parent 4e9ceff1e9
commit cf20964b59
No known key found for this signature in database
GPG Key ID: 048FF2B76A63895F
4 changed files with 3 additions and 17 deletions

View File

@ -10747,7 +10747,7 @@ canon_a5:
} else if (!strncmp(model,"ALPHA",5) ||
!strncmp(model,"DYNAX",5) ||
!strncmp(model,"MAXXUM",6)) {
sprintf (model+20, "DYNAX %-10s", model+6+(model[0]=='M'));
snprintf (model+20, 20-(model[0]=='M'), "DYNAX %-10s", model+6+(model[0]=='M'));
adobe_coeff (make, model+20);
load_raw = &CLASS packed_load_raw;
} else if (!strncmp(model,"DiMAGE G",8)) {

View File

@ -53,20 +53,6 @@
namespace
{
bool checkRawImageThumb (const rtengine::RawImage& raw_image)
{
if (!raw_image.is_supportedThumb()) {
return false;
}
const ssize_t length =
fdata (raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb()
? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3
: raw_image.get_thumbLength();
return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size;
}
/**
* Apply the black level adjustments in the processing parameters.
*

View File

@ -1273,7 +1273,7 @@ void Options::readFromFile(Glib::ustring fname)
std::map<std::string, int> checkedExtensions;
if (parseExtensions.size() == parseExtensionsEnabled.size()) {
for (auto i = 0; i < parseExtensions.size(); ++i) {
for (unsigned i = 0; i < parseExtensions.size(); ++i) {
checkedExtensions[parseExtensions[i]] = parseExtensionsEnabled[i];
}
}

View File

@ -66,7 +66,7 @@ bool CPBDump(
}
// open the file in write mode
const std::unique_ptr<FILE, decltype(&std::fclose)> f(g_fopen(commFName.c_str (), "wt"), &std::fclose);
const std::unique_ptr<FILE, int (*)(FILE *)> f(g_fopen(commFName.c_str(), "wt"), &std::fclose);
if (!f) {
printf ("CPBDump(\"%s\") >>> Error: unable to open file with write access!\n", commFName.c_str());