From 6819b32be7903dbb086fbd5edb6a798803a49542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Fri, 26 Aug 2022 11:54:12 +0200 Subject: [PATCH 1/8] Mute some warnings (#6563) --- rtengine/canon_cr3_decoder.cc | 2 + rtengine/dcraw.cc | 187 +++++++++++++++++----------------- rtengine/imageio.cc | 2 +- rtgui/main-cli.cc | 2 + rtgui/main.cc | 2 +- rtgui/rtimage.cc | 2 +- 6 files changed, 101 insertions(+), 96 deletions(-) diff --git a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc index b5f04a1c89..c5b1371926 100644 --- a/rtengine/canon_cr3_decoder.cc +++ b/rtengine/canon_cr3_decoder.cc @@ -2759,6 +2759,7 @@ bool crxMakeQStep(CrxImage *img, CrxTile *tile, std::int32_t *qpTable, std::uint } // continue to the next level - we always decode all levels ++qStep; + // fall through case 2: qStep->qStepTbl = qStepTbl; qStep->width = qpWidth; @@ -2777,6 +2778,7 @@ bool crxMakeQStep(CrxImage *img, CrxTile *tile, std::int32_t *qpTable, std::uint } // continue to the next level - we always decode all levels ++qStep; + // fall through case 1: qStep->qStepTbl = qStepTbl; qStep->width = qpWidth; diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index e4dbcbf940..64a6231328 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -2823,7 +2823,7 @@ void CLASS kodak_radc_load_raw() FORC3 { val = ((0x1000000/last[c] + 0x7ff) >> 12) * mul[c]; s = val > 65564 ? 10:12; - x = ~(-1 << (s-1)); + x = ~(~0U << (s-1)); val <<= 12-s; for (i=0; i < sizeof(buf[0])/sizeof(short); i++) ((short *)buf[c])[i] = (((short *)buf[c])[i] * val + x) >> s; @@ -3499,7 +3499,7 @@ void CLASS smal_decode_segment (unsigned seg[2][2], int holes) if ((data >> nbits & 0xff) == 0xff) break; if (nbits > 0) data = ((data & ((1 << (nbits-1)) - 1)) << 1) | - ((data + (((data & (1 << (nbits-1)))) << 1)) & (-1 << nbits)); + ((data + (((data & (1 << (nbits-1)))) << 1)) & (~0U << nbits)); if (nbits >= 0) { data += getbits(1); carry = nbits - 8; @@ -7323,7 +7323,7 @@ void CLASS ciff_block_1030() bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); vbits += 16; } - white[row][col] = bitbuf >> (vbits -= bpp) & ~(-1 << bpp); + white[row][col] = bitbuf >> (vbits -= bpp) & ~(~0U << bpp); } } @@ -7762,7 +7762,7 @@ void CLASS parse_cine() } cam_mul[0] = getreal(11); cam_mul[2] = getreal(11); - maximum = ~(-1 << get4()); + maximum = ~(~0U << get4()); fseek (ifp, 668, SEEK_CUR); shutter = get4()/1000000000.0; fseek (ifp, off_image, SEEK_SET); @@ -9360,107 +9360,108 @@ void CLASS identify() char make[10], model[20]; ushort offset; } table[] = { - { 786432,1024, 768, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-080C" }, - { 1447680,1392,1040, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-145C" }, - { 1920000,1600,1200, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-201C" }, - { 5067304,2588,1958, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-510C" }, + { 786432,1024, 768, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-080C",0 }, + { 1447680,1392,1040, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-145C",0 }, + { 1920000,1600,1200, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-201C",0 }, + { 5067304,2588,1958, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-510C",0 }, { 5067316,2588,1958, 0, 0, 0, 0, 0,0x94,0,0,"AVT","F-510C",12 }, - { 10134608,2588,1958, 0, 0, 0, 0, 9,0x94,0,0,"AVT","F-510C" }, + { 10134608,2588,1958, 0, 0, 0, 0, 9,0x94,0,0,"AVT","F-510C",0 }, { 10134620,2588,1958, 0, 0, 0, 0, 9,0x94,0,0,"AVT","F-510C",12 }, - { 16157136,3272,2469, 0, 0, 0, 0, 9,0x94,0,0,"AVT","F-810C" }, - { 15980544,3264,2448, 0, 0, 0, 0, 8,0x61,0,1,"AgfaPhoto","DC-833m" }, - { 9631728,2532,1902, 0, 0, 0, 0,96,0x61,0,0,"Alcatel","5035D" }, + { 16157136,3272,2469, 0, 0, 0, 0, 9,0x94,0,0,"AVT","F-810C",0 }, + { 15980544,3264,2448, 0, 0, 0, 0, 8,0x61,0,1,"AgfaPhoto","DC-833m",0 }, + { 9631728,2532,1902, 0, 0, 0, 0,96,0x61,0,0,"Alcatel","5035D",0 }, { 2868726,1384,1036, 0, 0, 0, 0,64,0x49,0,8,"Baumer","TXG14",1078 }, - { 5298000,2400,1766,12,12,44, 2, 8,0x94,0,2,"Canon","PowerShot SD300" }, - { 6553440,2664,1968, 4, 4,44, 4, 8,0x94,0,2,"Canon","PowerShot A460" }, - { 6573120,2672,1968,12, 8,44, 0, 8,0x94,0,2,"Canon","PowerShot A610" }, - { 6653280,2672,1992,10, 6,42, 2, 8,0x94,0,2,"Canon","PowerShot A530" }, - { 7710960,2888,2136,44, 8, 4, 0, 8,0x94,0,2,"Canon","PowerShot S3 IS" }, - { 9219600,3152,2340,36,12, 4, 0, 8,0x94,0,2,"Canon","PowerShot A620" }, - { 9243240,3152,2346,12, 7,44,13, 8,0x49,0,2,"Canon","PowerShot A470" }, - { 10341600,3336,2480, 6, 5,32, 3, 8,0x94,0,2,"Canon","PowerShot A720 IS" }, - { 10383120,3344,2484,12, 6,44, 6, 8,0x94,0,2,"Canon","PowerShot A630" }, - { 12945240,3736,2772,12, 6,52, 6, 8,0x94,0,2,"Canon","PowerShot A640" }, - { 15636240,4104,3048,48,12,24,12, 8,0x94,0,2,"Canon","PowerShot A650" }, - { 15467760,3720,2772, 6,12,30, 0, 8,0x94,0,2,"Canon","PowerShot SX110 IS" }, - { 15534576,3728,2778,12, 9,44, 9, 8,0x94,0,2,"Canon","PowerShot SX120 IS" }, - { 18653760,4080,3048,24,12,24,12, 8,0x94,0,2,"Canon","PowerShot SX20 IS" }, - { 19131120,4168,3060,92,16, 4, 1, 8,0x94,0,2,"Canon","PowerShot SX220 HS" }, - { 21936096,4464,3276,25,10,73,12, 8,0x16,0,2,"Canon","PowerShot SX30 IS" }, - { 24724224,4704,3504, 8,16,56, 8, 8,0x94,0,2,"Canon","PowerShot A3300 IS" }, - { 30858240,5248,3920, 8,16,56,16, 8,0x94,0,2,"Canon","IXUS 160" }, { 1976352,1632,1211, 0, 2, 0, 1, 0,0x94,0,1,"Casio","QV-2000UX" }, - { 3217760,2080,1547, 0, 0,10, 1, 0,0x94,0,1,"Casio","QV-3*00EX" }, - { 6218368,2585,1924, 0, 0, 9, 0, 0,0x94,0,1,"Casio","QV-5700" }, - { 7816704,2867,2181, 0, 0,34,36, 0,0x16,0,1,"Casio","EX-Z60" }, - { 2937856,1621,1208, 0, 0, 1, 0, 0,0x94,7,13,"Casio","EX-S20" }, - { 4948608,2090,1578, 0, 0,32,34, 0,0x94,7,1,"Casio","EX-S100" }, - { 6054400,2346,1720, 2, 0,32, 0, 0,0x94,7,1,"Casio","QV-R41" }, - { 7426656,2568,1928, 0, 0, 0, 0, 0,0x94,0,1,"Casio","EX-P505" }, - { 7530816,2602,1929, 0, 0,22, 0, 0,0x94,7,1,"Casio","QV-R51" }, - { 7542528,2602,1932, 0, 0,32, 0, 0,0x94,7,1,"Casio","EX-Z50" }, - { 7562048,2602,1937, 0, 0,25, 0, 0,0x16,7,1,"Casio","EX-Z500" }, - { 7753344,2602,1986, 0, 0,32,26, 0,0x94,7,1,"Casio","EX-Z55" }, - { 9313536,2858,2172, 0, 0,14,30, 0,0x94,7,1,"Casio","EX-P600" }, - { 10834368,3114,2319, 0, 0,27, 0, 0,0x94,0,1,"Casio","EX-Z750" }, - { 10843712,3114,2321, 0, 0,25, 0, 0,0x94,0,1,"Casio","EX-Z75" }, - { 10979200,3114,2350, 0, 0,32,32, 0,0x94,7,1,"Casio","EX-P700" }, - { 12310144,3285,2498, 0, 0, 6,30, 0,0x94,0,1,"Casio","EX-Z850" }, - { 12489984,3328,2502, 0, 0,47,35, 0,0x94,0,1,"Casio","EX-Z8" }, - { 15499264,3754,2752, 0, 0,82, 0, 0,0x94,0,1,"Casio","EX-Z1050" }, - { 18702336,4096,3044, 0, 0,24, 0,80,0x94,7,1,"Casio","EX-ZR100" }, - { 7684000,2260,1700, 0, 0, 0, 0,13,0x94,0,1,"Casio","QV-4000" }, - { 787456,1024, 769, 0, 1, 0, 0, 0,0x49,0,0,"Creative","PC-CAM 600" }, - { 28829184,4384,3288, 0, 0, 0, 0,36,0x61,0,0,"DJI" }, - { 15151104,4608,3288, 0, 0, 0, 0, 0,0x94,0,0,"Matrix" }, - { 3840000,1600,1200, 0, 0, 0, 0,65,0x49,0,0,"Foculus","531C" }, - { 307200, 640, 480, 0, 0, 0, 0, 0,0x94,0,0,"Generic" }, - { 62464, 256, 244, 1, 1, 6, 1, 0,0x8d,0,0,"Kodak","DC20" }, - { 124928, 512, 244, 1, 1,10, 1, 0,0x8d,0,0,"Kodak","DC20" }, - { 1652736,1536,1076, 0,52, 0, 0, 0,0x61,0,0,"Kodak","DCS200" }, - { 4159302,2338,1779, 1,33, 1, 2, 0,0x94,0,0,"Kodak","C330" }, + { 5298000,2400,1766,12,12,44, 2, 8,0x94,0,2,"Canon","PowerShot SD300",0 }, + { 6553440,2664,1968, 4, 4,44, 4, 8,0x94,0,2,"Canon","PowerShot A460",0 }, + { 6573120,2672,1968,12, 8,44, 0, 8,0x94,0,2,"Canon","PowerShot A610",0 }, + { 6653280,2672,1992,10, 6,42, 2, 8,0x94,0,2,"Canon","PowerShot A530",0 }, + { 7710960,2888,2136,44, 8, 4, 0, 8,0x94,0,2,"Canon","PowerShot S3 IS",0 }, + { 9219600,3152,2340,36,12, 4, 0, 8,0x94,0,2,"Canon","PowerShot A620",0 }, + { 9243240,3152,2346,12, 7,44,13, 8,0x49,0,2,"Canon","PowerShot A470",0 }, + { 10341600,3336,2480, 6, 5,32, 3, 8,0x94,0,2,"Canon","PowerShot A720 IS",0 }, + { 10383120,3344,2484,12, 6,44, 6, 8,0x94,0,2,"Canon","PowerShot A630",0 }, + { 12945240,3736,2772,12, 6,52, 6, 8,0x94,0,2,"Canon","PowerShot A640",0 }, + { 15636240,4104,3048,48,12,24,12, 8,0x94,0,2,"Canon","PowerShot A650",0 }, + { 15467760,3720,2772, 6,12,30, 0, 8,0x94,0,2,"Canon","PowerShot SX110 IS",0 }, + { 15534576,3728,2778,12, 9,44, 9, 8,0x94,0,2,"Canon","PowerShot SX120 IS",0 }, + { 18653760,4080,3048,24,12,24,12, 8,0x94,0,2,"Canon","PowerShot SX20 IS",0 }, + { 19131120,4168,3060,92,16, 4, 1, 8,0x94,0,2,"Canon","PowerShot SX220 HS",0 }, + { 21936096,4464,3276,25,10,73,12, 8,0x16,0,2,"Canon","PowerShot SX30 IS",0 }, + { 24724224,4704,3504, 8,16,56, 8, 8,0x94,0,2,"Canon","PowerShot A3300 IS",0 }, + { 30858240,5248,3920, 8,16,56,16, 8,0x94,0,2,"Canon","IXUS 160",0 }, + { 1976352,1632,1211, 0, 2, 0, 1, 0,0x94,0,1,"Casio","QV-2000UX",0 }, + { 3217760,2080,1547, 0, 0,10, 1, 0,0x94,0,1,"Casio","QV-3*00EX",0 }, + { 6218368,2585,1924, 0, 0, 9, 0, 0,0x94,0,1,"Casio","QV-5700",0 }, + { 7816704,2867,2181, 0, 0,34,36, 0,0x16,0,1,"Casio","EX-Z60",0 }, + { 2937856,1621,1208, 0, 0, 1, 0, 0,0x94,7,13,"Casio","EX-S20",0 }, + { 4948608,2090,1578, 0, 0,32,34, 0,0x94,7,1,"Casio","EX-S100",0 }, + { 6054400,2346,1720, 2, 0,32, 0, 0,0x94,7,1,"Casio","QV-R41",0 }, + { 7426656,2568,1928, 0, 0, 0, 0, 0,0x94,0,1,"Casio","EX-P505",0 }, + { 7530816,2602,1929, 0, 0,22, 0, 0,0x94,7,1,"Casio","QV-R51",0 }, + { 7542528,2602,1932, 0, 0,32, 0, 0,0x94,7,1,"Casio","EX-Z50",0 }, + { 7562048,2602,1937, 0, 0,25, 0, 0,0x16,7,1,"Casio","EX-Z500",0 }, + { 7753344,2602,1986, 0, 0,32,26, 0,0x94,7,1,"Casio","EX-Z55",0 }, + { 9313536,2858,2172, 0, 0,14,30, 0,0x94,7,1,"Casio","EX-P600",0 }, + { 10834368,3114,2319, 0, 0,27, 0, 0,0x94,0,1,"Casio","EX-Z750",0 }, + { 10843712,3114,2321, 0, 0,25, 0, 0,0x94,0,1,"Casio","EX-Z75",0 }, + { 10979200,3114,2350, 0, 0,32,32, 0,0x94,7,1,"Casio","EX-P700",0 }, + { 12310144,3285,2498, 0, 0, 6,30, 0,0x94,0,1,"Casio","EX-Z850",0 }, + { 12489984,3328,2502, 0, 0,47,35, 0,0x94,0,1,"Casio","EX-Z8",0 }, + { 15499264,3754,2752, 0, 0,82, 0, 0,0x94,0,1,"Casio","EX-Z1050",0 }, + { 18702336,4096,3044, 0, 0,24, 0,80,0x94,7,1,"Casio","EX-ZR100",0 }, + { 7684000,2260,1700, 0, 0, 0, 0,13,0x94,0,1,"Casio","QV-4000",0 }, + { 787456,1024, 769, 0, 1, 0, 0, 0,0x49,0,0,"Creative","PC-CAM 600",0 }, + { 28829184,4384,3288, 0, 0, 0, 0,36,0x61,0,0,"DJI",0 }, + { 15151104,4608,3288, 0, 0, 0, 0, 0,0x94,0,0,"Matrix",0 }, + { 3840000,1600,1200, 0, 0, 0, 0,65,0x49,0,0,"Foculus","531C",0 }, + { 307200, 640, 480, 0, 0, 0, 0, 0,0x94,0,0,"Generic",0 }, + { 62464, 256, 244, 1, 1, 6, 1, 0,0x8d,0,0,"Kodak","DC20",0 }, + { 124928, 512, 244, 1, 1,10, 1, 0,0x8d,0,0,"Kodak","DC20",0 }, + { 1652736,1536,1076, 0,52, 0, 0, 0,0x61,0,0,"Kodak","DCS200",0 }, + { 4159302,2338,1779, 1,33, 1, 2, 0,0x94,0,0,"Kodak","C330",0 }, { 4162462,2338,1779, 1,33, 1, 2, 0,0x94,0,0,"Kodak","C330",3160 }, - { 2247168,1232, 912, 0, 0,16, 0, 0,0x00,0,0,"Kodak","C330" }, - { 3370752,1232, 912, 0, 0,16, 0, 0,0x00,0,0,"Kodak","C330" }, - { 6163328,2864,2152, 0, 0, 0, 0, 0,0x94,0,0,"Kodak","C603" }, + { 2247168,1232, 912, 0, 0,16, 0, 0,0x00,0,0,"Kodak","C330",0 }, + { 3370752,1232, 912, 0, 0,16, 0, 0,0x00,0,0,"Kodak","C330",0 }, + { 6163328,2864,2152, 0, 0, 0, 0, 0,0x94,0,0,"Kodak","C603",0 }, { 6166488,2864,2152, 0, 0, 0, 0, 0,0x94,0,0,"Kodak","C603",3160 }, - { 460800, 640, 480, 0, 0, 0, 0, 0,0x00,0,0,"Kodak","C603" }, - { 9116448,2848,2134, 0, 0, 0, 0, 0,0x00,0,0,"Kodak","C603" }, - { 12241200,4040,3030, 2, 0, 0,13, 0,0x49,0,0,"Kodak","12MP" }, + { 460800, 640, 480, 0, 0, 0, 0, 0,0x00,0,0,"Kodak","C603",0 }, + { 9116448,2848,2134, 0, 0, 0, 0, 0,0x00,0,0,"Kodak","C603",0 }, + { 12241200,4040,3030, 2, 0, 0,13, 0,0x49,0,0,"Kodak","12MP",0 }, { 12272756,4040,3030, 2, 0, 0,13, 0,0x49,0,0,"Kodak","12MP",31556 }, - { 18000000,4000,3000, 0, 0, 0, 0, 0,0x00,0,0,"Kodak","12MP" }, - { 614400, 640, 480, 0, 3, 0, 0,64,0x94,0,0,"Kodak","KAI-0340" }, - { 15360000,3200,2400, 0, 0, 0, 0,96,0x16,0,0,"Lenovo","A820" }, + { 18000000,4000,3000, 0, 0, 0, 0, 0,0x00,0,0,"Kodak","12MP",0 }, + { 614400, 640, 480, 0, 3, 0, 0,64,0x94,0,0,"Kodak","KAI-0340",0 }, + { 15360000,3200,2400, 0, 0, 0, 0,96,0x16,0,0,"Lenovo","A820",0 }, { 3884928,1608,1207, 0, 0, 0, 0,96,0x16,0,0,"Micron","2010",3212 }, { 1138688,1534, 986, 0, 0, 0, 0, 0,0x61,0,0,"Minolta","RD175",513 }, - { 1581060,1305, 969, 0, 0,18, 6, 6,0x1e,4,1,"Nikon","E900" }, - { 2465792,1638,1204, 0, 0,22, 1, 6,0x4b,5,1,"Nikon","E950" }, - { 2940928,1616,1213, 0, 0, 0, 7,30,0x94,0,1,"Nikon","E2100" }, - { 4771840,2064,1541, 0, 0, 0, 1, 6,0xe1,0,1,"Nikon","E990" }, - { 4775936,2064,1542, 0, 0, 0, 0,30,0x94,0,1,"Nikon","E3700" }, - { 5865472,2288,1709, 0, 0, 0, 1, 6,0xb4,0,1,"Nikon","E4500" }, - { 5869568,2288,1710, 0, 0, 0, 0, 6,0x16,0,1,"Nikon","E4300" }, - { 7438336,2576,1925, 0, 0, 0, 1, 6,0xb4,0,1,"Nikon","E5000" }, - { 8998912,2832,2118, 0, 0, 0, 0,30,0x94,7,1,"Nikon","COOLPIX S6" }, - { 5939200,2304,1718, 0, 0, 0, 0,30,0x16,0,0,"Olympus","C770UZ" }, - { 3178560,2064,1540, 0, 0, 0, 0, 0,0x94,0,1,"Pentax","Optio S" }, - { 4841984,2090,1544, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S" }, - { 6114240,2346,1737, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S4" }, - { 10702848,3072,2322, 0, 0, 0,21,30,0x94,0,1,"Pentax","Optio 750Z" }, - { 4147200,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD" }, + { 1581060,1305, 969, 0, 0,18, 6, 6,0x1e,4,1,"Nikon","E900",0 }, + { 2465792,1638,1204, 0, 0,22, 1, 6,0x4b,5,1,"Nikon","E950",0 }, + { 2940928,1616,1213, 0, 0, 0, 7,30,0x94,0,1,"Nikon","E2100",0 }, + { 4771840,2064,1541, 0, 0, 0, 1, 6,0xe1,0,1,"Nikon","E990",0 }, + { 4775936,2064,1542, 0, 0, 0, 0,30,0x94,0,1,"Nikon","E3700",0 }, + { 5865472,2288,1709, 0, 0, 0, 1, 6,0xb4,0,1,"Nikon","E4500",0 }, + { 5869568,2288,1710, 0, 0, 0, 0, 6,0x16,0,1,"Nikon","E4300",0 }, + { 7438336,2576,1925, 0, 0, 0, 1, 6,0xb4,0,1,"Nikon","E5000",0 }, + { 8998912,2832,2118, 0, 0, 0, 0,30,0x94,7,1,"Nikon","COOLPIX S6",0 }, + { 5939200,2304,1718, 0, 0, 0, 0,30,0x16,0,0,"Olympus","C770UZ",0 }, + { 3178560,2064,1540, 0, 0, 0, 0, 0,0x94,0,1,"Pentax","Optio S",0 }, + { 4841984,2090,1544, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S",0 }, + { 6114240,2346,1737, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S4",0 }, + { 10702848,3072,2322, 0, 0, 0,21,30,0x94,0,1,"Pentax","Optio 750Z",0 }, + { 4147200,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD",0 }, { 4151666,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD",8 }, - { 13248000,2208,3000, 0, 0, 0, 0,13,0x61,0,0,"Pixelink","A782" }, - { 6291456,2048,1536, 0, 0, 0, 0,96,0x61,0,0,"RoverShot","3320AF" }, - { 311696, 644, 484, 0, 0, 0, 0, 0,0x16,0,8,"ST Micro","STV680 VGA" }, - { 16098048,3288,2448, 0, 0,24, 0, 9,0x94,0,1,"Samsung","S85" }, - { 16215552,3312,2448, 0, 0,48, 0, 9,0x94,0,1,"Samsung","S85" }, - { 20487168,3648,2808, 0, 0, 0, 0,13,0x94,5,1,"Samsung","WB550" }, - { 24000000,4000,3000, 0, 0, 0, 0,13,0x94,5,1,"Samsung","WB550" }, + { 13248000,2208,3000, 0, 0, 0, 0,13,0x61,0,0,"Pixelink","A782",0 }, + { 6291456,2048,1536, 0, 0, 0, 0,96,0x61,0,0,"RoverShot","3320AF",0 }, + { 311696, 644, 484, 0, 0, 0, 0, 0,0x16,0,8,"ST Micro","STV680 VGA",0 }, + { 16098048,3288,2448, 0, 0,24, 0, 9,0x94,0,1,"Samsung","S85",0 }, + { 16215552,3312,2448, 0, 0,48, 0, 9,0x94,0,1,"Samsung","S85",0 }, + { 20487168,3648,2808, 0, 0, 0, 0,13,0x94,5,1,"Samsung","WB550",0 }, + { 24000000,4000,3000, 0, 0, 0, 0,13,0x94,5,1,"Samsung","WB550",0 }, { 12582980,3072,2048, 0, 0, 0, 0,33,0x61,0,0,"Sinar","",68 }, { 33292868,4080,4080, 0, 0, 0, 0,33,0x61,0,0,"Sinar","",68 }, { 44390468,4080,5440, 0, 0, 0, 0,33,0x61,0,0,"Sinar","",68 }, - { 1409024,1376,1024, 0, 0, 1, 0, 0,0x49,0,0,"Sony","XCD-SX910CR" }, - { 2818048,1376,1024, 0, 0, 1, 0,97,0x49,0,0,"Sony","XCD-SX910CR" }, - { 17496000,4320,3240, 0, 0, 0,0,224,0x94,0,0,"Xiro","Xplorer V" }, + { 1409024,1376,1024, 0, 0, 1, 0, 0,0x49,0,0,"Sony","XCD-SX910CR",0 }, + { 2818048,1376,1024, 0, 0, 1, 0,97,0x49,0,0,"Sony","XCD-SX910CR",0 }, + { 17496000,4320,3240, 0, 0, 0,0,224,0x94,0,0,"Xiro","Xplorer V",0 }, }; static const char *corp[] = { "AgfaPhoto", "Canon", "Casio", "Epson", "Fujifilm", diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index ce44d1ff48..ca41aa0073 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -999,7 +999,7 @@ void PNGwriteRawProfile(png_struct *ping, png_info *ping_info, const char *profi } // namespace -int ImageIO::savePNG (const Glib::ustring &fname, int bps) const +int ImageIO::savePNG (const Glib::ustring &fname, volatile int bps) const { if (getWidth() < 1 || getHeight() < 1) { return IMIO_HEADERERROR; diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index feef935646..b2a0d57502 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -290,6 +290,7 @@ int processLineParams ( int argc, char **argv ) case 'O': copyParamsFile = true; + // fall through case 'o': // outputfile or dir if ( iArg + 1 < argc ) { @@ -341,6 +342,7 @@ int processLineParams ( int argc, char **argv ) case 'S': skipIfNoSidecar = true; + // fall through case 's': // Processing params next to file (file extension appended) sideProcParams = true; diff --git a/rtgui/main.cc b/rtgui/main.cc index 9f623a6df1..ebbb480c90 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -169,7 +169,7 @@ int processLineParams ( int argc, char **argv ) break; } - // no break here on purpose + // fall through case 'h': case '?': diff --git a/rtgui/rtimage.cc b/rtgui/rtimage.cc index 44078ed3b4..49551d5e6c 100644 --- a/rtgui/rtimage.cc +++ b/rtgui/rtimage.cc @@ -38,7 +38,7 @@ int RTImage::scaleBack = 0; RTImage::RTImage () {} -RTImage::RTImage (RTImage &other) : surface(other.surface), pixbuf(other.pixbuf) +RTImage::RTImage (RTImage &other) : Gtk::Image(), surface(other.surface), pixbuf(other.pixbuf) { if (pixbuf) { set(pixbuf); From 4b97a5cf3c0d124c90fb8eae989facefff8024c5 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Mon, 5 Sep 2022 18:05:35 -0700 Subject: [PATCH 2/8] Placate some GCC warnings (#6563) --- rtengine/imagedata.cc | 3 ++- rtengine/imageio.cc | 23 ++++++++++++----------- rtgui/myflatcurve.cc | 8 ++------ rtgui/rtimage.cc | 2 +- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 3c10e7dc0e..5d3fef80b1 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ +#include #include #include @@ -601,7 +602,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory* // ----------------------- Special file type detection (HDR, PixelShift) ------------------------ - uint16 bitspersample = 0, samplesperpixel = 0, sampleformat = 0, photometric = 0, compression = 0; + uint16_t bitspersample = 0, samplesperpixel = 0, sampleformat = 0, photometric = 0, compression = 0; const rtexif::Tag* const bps = frameRootDir->findTag("BitsPerSample"); const rtexif::Tag* const spp = frameRootDir->findTag("SamplesPerPixel"); const rtexif::Tag* const sf = frameRootDir->findTag("SampleFormat"); diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index ca41aa0073..39ab679e93 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -664,7 +665,7 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s return IMIO_CANNOTREADFILE; } - uint16 bitspersample = 0, samplesperpixel = 0, sampleformat = 0; + uint16_t bitspersample = 0, samplesperpixel = 0, sampleformat = 0; int hasTag = TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); hasTag &= TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); @@ -689,7 +690,7 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s sampleformat = SAMPLEFORMAT_UINT; } - uint16 config; + uint16_t config; TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config); if (config == PLANARCONFIG_CONTIG) { @@ -701,14 +702,14 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s return IMIO_VARIANTNOTSUPPORTED; } - uint16 photometric; + uint16_t photometric; if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric)) { TIFFClose(in); return IMIO_VARIANTNOTSUPPORTED; } - uint16 compression; + uint16_t compression; if (photometric == PHOTOMETRIC_LOGLUV) if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression)) { @@ -786,7 +787,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); - uint16 bitspersample, samplesperpixel; + uint16_t bitspersample, samplesperpixel; int hasTag = TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); hasTag &= TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); @@ -798,7 +799,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) return IMIO_VARIANTNOTSUPPORTED; } - uint16 config; + uint16_t config; TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config); if (config != PLANARCONFIG_CONTIG) { @@ -819,7 +820,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) */ if (settings->verbose) { printf("Information of \"%s\":\n", fname.c_str()); - uint16 tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; + uint16_t tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) { printf(" DefaultScale: %d\n", tiffDefaultScale); } @@ -836,7 +837,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) else printf(" No LinearResponseLimit value!\n"); - uint16 tiffMinValue, tiffMaxValue; + uint16_t tiffMinValue, tiffMaxValue; if (TIFFGetField(in, TIFFTAG_SMINSAMPLEVALUE, &tiffMinValue)) { printf(" MinValue: %d\n", tiffMinValue); } @@ -1556,15 +1557,15 @@ int ImageIO::saveTIFF (const Glib::ustring &fname, int bps, bool isFloat, bool u */ if (applyExifPatch) { unsigned char b[10]; - uint16 tagCount = 0; + uint16_t tagCount = 0; lseek(fileno, 4, SEEK_SET); read(fileno, b, 4); - uint32 ifd0Offset = rtexif::sget4(b, exifRoot->getOrder()); + uint32_t ifd0Offset = rtexif::sget4(b, exifRoot->getOrder()); lseek(fileno, ifd0Offset, SEEK_SET); read(fileno, b, 2); tagCount = rtexif::sget2(b, exifRoot->getOrder()); for (size_t i = 0; i < tagCount ; ++i) { - uint16 tagID = 0; + uint16_t tagID = 0; read(fileno, b, 2); tagID = rtexif::sget2(b, exifRoot->getOrder()); if (tagID == 0x8769) { diff --git a/rtgui/myflatcurve.cc b/rtgui/myflatcurve.cc index 11d89ebd89..8ccc28c211 100644 --- a/rtgui/myflatcurve.cc +++ b/rtgui/myflatcurve.cc @@ -1643,7 +1643,8 @@ void MyFlatCurve::movePoint(bool moveX, bool moveY, bool pipetteDrag) void MyFlatCurve::getCursorPosition(Gdk::EventType evType, bool isHint, int evX, int evY, Gdk::ModifierType modifierKey) { int tx, ty; - int prevCursorX, prevCursorY; + int prevCursorX = cursorX; + int prevCursorY = cursorY; double incrementX = 1. / double(graphW); double incrementY = 1. / double(graphH); @@ -1672,11 +1673,6 @@ void MyFlatCurve::getCursorPosition(Gdk::EventType evType, bool isHint, int evX, break; } - if (editedHandle != FCT_EditedHandle_None) { - prevCursorX = cursorX; - prevCursorY = cursorY; - } - cursorX = tx - graphX; cursorY = graphY - ty; diff --git a/rtgui/rtimage.cc b/rtgui/rtimage.cc index 49551d5e6c..13dd22a7bd 100644 --- a/rtgui/rtimage.cc +++ b/rtgui/rtimage.cc @@ -38,7 +38,7 @@ int RTImage::scaleBack = 0; RTImage::RTImage () {} -RTImage::RTImage (RTImage &other) : Gtk::Image(), surface(other.surface), pixbuf(other.pixbuf) +RTImage::RTImage (RTImage &other) : sigc::trackable(), Glib::ObjectBase(), Gtk::Image(), surface(other.surface), pixbuf(other.pixbuf) { if (pixbuf) { set(pixbuf); From aa02ee8c49f3eddaf4e4ccaace59ef60354a1b12 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Thu, 8 Sep 2022 23:14:16 -0700 Subject: [PATCH 3/8] Qualify some std integer types --- rtengine/imagedata.cc | 2 +- rtengine/imageio.cc | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 5d3fef80b1..0556c4456e 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -602,7 +602,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory* // ----------------------- Special file type detection (HDR, PixelShift) ------------------------ - uint16_t bitspersample = 0, samplesperpixel = 0, sampleformat = 0, photometric = 0, compression = 0; + std::uint16_t bitspersample = 0, samplesperpixel = 0, sampleformat = 0, photometric = 0, compression = 0; const rtexif::Tag* const bps = frameRootDir->findTag("BitsPerSample"); const rtexif::Tag* const spp = frameRootDir->findTag("SamplesPerPixel"); const rtexif::Tag* const sf = frameRootDir->findTag("SampleFormat"); diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 39ab679e93..646a11b4de 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -665,7 +665,7 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s return IMIO_CANNOTREADFILE; } - uint16_t bitspersample = 0, samplesperpixel = 0, sampleformat = 0; + std::uint16_t bitspersample = 0, samplesperpixel = 0, sampleformat = 0; int hasTag = TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); hasTag &= TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); @@ -690,7 +690,7 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s sampleformat = SAMPLEFORMAT_UINT; } - uint16_t config; + std::uint16_t config; TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config); if (config == PLANARCONFIG_CONTIG) { @@ -702,14 +702,14 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s return IMIO_VARIANTNOTSUPPORTED; } - uint16_t photometric; + std::uint16_t photometric; if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric)) { TIFFClose(in); return IMIO_VARIANTNOTSUPPORTED; } - uint16_t compression; + std::uint16_t compression; if (photometric == PHOTOMETRIC_LOGLUV) if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression)) { @@ -787,7 +787,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); - uint16_t bitspersample, samplesperpixel; + std::uint16_t bitspersample, samplesperpixel; int hasTag = TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); hasTag &= TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); @@ -799,7 +799,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) return IMIO_VARIANTNOTSUPPORTED; } - uint16_t config; + std::uint16_t config; TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config); if (config != PLANARCONFIG_CONTIG) { @@ -820,7 +820,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) */ if (settings->verbose) { printf("Information of \"%s\":\n", fname.c_str()); - uint16_t tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; + std::uint16_t tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) { printf(" DefaultScale: %d\n", tiffDefaultScale); } @@ -837,7 +837,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) else printf(" No LinearResponseLimit value!\n"); - uint16_t tiffMinValue, tiffMaxValue; + std::uint16_t tiffMinValue, tiffMaxValue; if (TIFFGetField(in, TIFFTAG_SMINSAMPLEVALUE, &tiffMinValue)) { printf(" MinValue: %d\n", tiffMinValue); } @@ -1557,15 +1557,15 @@ int ImageIO::saveTIFF (const Glib::ustring &fname, int bps, bool isFloat, bool u */ if (applyExifPatch) { unsigned char b[10]; - uint16_t tagCount = 0; + std::uint16_t tagCount = 0; lseek(fileno, 4, SEEK_SET); read(fileno, b, 4); - uint32_t ifd0Offset = rtexif::sget4(b, exifRoot->getOrder()); + std::uint32_t ifd0Offset = rtexif::sget4(b, exifRoot->getOrder()); lseek(fileno, ifd0Offset, SEEK_SET); read(fileno, b, 2); tagCount = rtexif::sget2(b, exifRoot->getOrder()); for (size_t i = 0; i < tagCount ; ++i) { - uint16_t tagID = 0; + std::uint16_t tagID = 0; read(fileno, b, 2); tagID = rtexif::sget2(b, exifRoot->getOrder()); if (tagID == 0x8769) { From a2394e08cef9fa1b766c3c255c6a07c2080fdff8 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 11 Sep 2022 15:10:04 -0700 Subject: [PATCH 4/8] Replace deprecated function (#6563) --- rtgui/rtscalable.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc index 78202326ae..fda143c4df 100644 --- a/rtgui/rtscalable.cc +++ b/rtgui/rtscalable.cc @@ -241,7 +241,7 @@ Cairo::RefPtr RTScalable::loadImage(const Glib::ustring &fn c->set_operator (Cairo::OPERATOR_OVER); c->scale(r, r); rsvg_handle_render_cairo(handle, c->cobj()); - rsvg_handle_free(handle); + g_object_unref(handle); // -------------------- Saving the image in cache -------------------- From cf20964b59505b9b5e7c9c8142aa04598c52d5fe Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:39:07 -0800 Subject: [PATCH 5/8] Fix compiler warnings --- rtengine/dcraw.cc | 2 +- rtengine/rtthumbnail.cc | 14 -------------- rtgui/options.cc | 2 +- rtgui/thumbnail.cc | 2 +- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 2e93983b61..4d03989f8f 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -10747,7 +10747,7 @@ void CLASS identify() } 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)) { diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 26c1cd6461..e30571c1ae 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -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. * diff --git a/rtgui/options.cc b/rtgui/options.cc index bdc595f5c1..c06711d3b1 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -1273,7 +1273,7 @@ void Options::readFromFile(Glib::ustring fname) std::map 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]; } } diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index f5098ae6da..f03eaecccd 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -66,7 +66,7 @@ bool CPBDump( } // open the file in write mode - const std::unique_ptr f(g_fopen(commFName.c_str (), "wt"), &std::fclose); + const std::unique_ptr 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()); From 721d6641360aa9f3a7e19cd5ec28bf118cd4ce07 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 17 Nov 2024 21:57:03 -0800 Subject: [PATCH 6/8] Fix compiler warnings --- rtengine/FTblockDN.cc | 4 ++-- rtengine/iplocallab.cc | 3 ++- rtengine/ipwavelet.cc | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 4d87509291..69b6b55c00 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -755,8 +755,8 @@ BENCHFUN int min_numblox_W = ceil((static_cast((MIN(imwidth, ((numtiles_W - 1) * tileWskip) + tilewidth)) - ((numtiles_W - 1) * tileWskip))) / (offset)) + 2 * blkrad; // these are needed only for creation of the plans and will be freed before entering the parallel loop - fftwf_plan plan_forward_blox[2]; - fftwf_plan plan_backward_blox[2]; + fftwf_plan plan_forward_blox[2] = {}; + fftwf_plan plan_backward_blox[2] = {}; if (denoiseLuminance) { float *Lbloxtmp = reinterpret_cast(fftwf_malloc(max_numblox_W * TS * TS * sizeof(float))); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 13f974d1aa..18227596bf 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -6728,7 +6728,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int bdecomp.reconstruct(tmpab.b[0]); } - float meanfab1, fab1, maxfab1; + float meanfab1, fab1; + float maxfab1 = 0.f; std::unique_ptr buforig; buforig.reset(new LabImage(bfw, bfh)); #ifdef _OPENMP diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 536b892956..50b8180135 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -224,7 +224,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; const int imheight = lab->H, imwidth = lab->W; - int levwavL; + int levwavL = 0; //Flat curve for H=f(H) in final touchup for guidedfilter FlatCurve* wavguidCurve = new FlatCurve(params->wavelet.wavguidcurve); //curve H=f(H) bool wavguidutili = false; @@ -258,6 +258,8 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const cp.complex = 0; } else if (params->wavelet.complexmethod == "expert") { cp.complex = 1; + } else { + cp.complex = 0; } From 29a344aef15901b88bfa7ba216e1101170664b29 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:42:33 -0800 Subject: [PATCH 7/8] Fix some more compiler warnings --- rtgui/editorpanel.cc | 1 + rtgui/options.cc | 2 +- rtgui/profilestorecombobox.cc | 2 +- rtgui/rtscalable.cc | 2 +- rtgui/rtsurface.cc | 2 +- rtgui/toolpanelcoord.cc | 53 +++++++++++++++++++++++++++++++++++ 6 files changed, 58 insertions(+), 4 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index b03dab5e87..4dfa7b106e 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -299,6 +299,7 @@ void setUserOnlyPermission(const Glib::RefPtr file, bool execute) .grfAccessPermissions = FILE_ALL_ACCESS, .grfAccessMode = GRANT_ACCESS, .grfInheritance = NO_INHERITANCE, + .Trustee = {}, }; BuildTrusteeWithSid(&(ea.Trustee), user_sid); PACL new_dacl_raw = nullptr; diff --git a/rtgui/options.cc b/rtgui/options.cc index c06711d3b1..5c4625cebb 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -370,7 +370,7 @@ void Options::setDefaults() maxZoomLimit = MaxZoom::PERCENTS_1600; #ifdef _WIN32 // use windows setting for visibility of hidden files/folders - SHELLFLAGSTATE sft = { 0 }; + SHELLFLAGSTATE sft = { }; SHGetSettings(&sft, SSF_SHOWALLOBJECTS); fbShowHidden = sft.fShowAllObjects; #else diff --git a/rtgui/profilestorecombobox.cc b/rtgui/profilestorecombobox.cc index a6085e7a93..83a465a41c 100644 --- a/rtgui/profilestorecombobox.cc +++ b/rtgui/profilestorecombobox.cc @@ -314,7 +314,7 @@ Gtk::TreeIter ProfileStoreComboBox::getRowFromLabel (const Glib::ustring &name) const ProfileStoreEntry *pse = currRow[methodColumns.profileStoreEntry]; if (pse->label == name) { - return std::move(currRow); + return currRow; } } } diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc index 29d437256d..70b578bca1 100644 --- a/rtgui/rtscalable.cc +++ b/rtgui/rtscalable.cc @@ -87,7 +87,7 @@ Cairo::RefPtr RTScalable::loadSurfaceFromIcon(const Glib::u // Create surface from corresponding icon const auto pos = iconPath.find_last_of('.'); - if (pos >= 0 && pos < iconPath.length()) { + if (pos < iconPath.length()) { const auto fext = iconPath.substr(pos + 1, iconPath.length()).lowercase(); // Case where iconPath is a PNG file diff --git a/rtgui/rtsurface.cc b/rtgui/rtsurface.cc index a4015494a3..ee6a83ff59 100644 --- a/rtgui/rtsurface.cc +++ b/rtgui/rtsurface.cc @@ -57,7 +57,7 @@ RTSurface::RTSurface(const Glib::ustring &fname) : // Create surface based on file extension const auto pos = fname.find_last_of('.'); - if (pos >= 0 && pos < fname.length()) { + if (pos < fname.length()) { const auto fext = fname.substr(pos + 1, fname.length()).lowercase(); // Case where fname is a PNG file diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index 9b3bcf6ea4..2e72577f59 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -40,126 +40,161 @@ using ToolTree = ToolPanelCoordinator::ToolTree; const std::vector EXPOSURE_PANEL_TOOLS = { { .id = Tool::TONE_CURVE, + .children = {}, }, { .id = Tool::SHADOWS_HIGHLIGHTS, + .children = {}, }, { .id = Tool::TONE_EQUALIZER, + .children = {}, }, { .id = Tool::EPD, + .children = {}, }, { .id = Tool::FATTAL, + .children = {}, }, { .id = Tool::PC_VIGNETTE, + .children = {}, }, { .id = Tool::GRADIENT, + .children = {}, }, { .id = Tool::L_CURVE, + .children = {}, }, }; const std::vector DETAILS_PANEL_TOOLS = { { .id = Tool::SPOT, + .children = {}, }, { .id = Tool::SHARPENING_TOOL, + .children = {}, }, { .id = Tool::LOCAL_CONTRAST, + .children = {}, }, { .id = Tool::SHARPEN_EDGE, + .children = {}, }, { .id = Tool::SHARPEN_MICRO, + .children = {}, }, { .id = Tool::IMPULSE_DENOISE, + .children = {}, }, { .id = Tool::DIR_PYR_DENOISE, + .children = {}, }, { .id = Tool::DEFRINGE_TOOL, + .children = {}, }, { .id = Tool::DIR_PYR_EQUALIZER, + .children = {}, }, { .id = Tool::DEHAZE, + .children = {}, }, }; const std::vector COLOR_PANEL_TOOLS = { { .id = Tool::WHITE_BALANCE, + .children = {}, }, { .id = Tool::VIBRANCE, + .children = {}, }, { .id = Tool::CH_MIXER, + .children = {}, }, { .id = Tool::BLACK_WHITE, + .children = {}, }, { .id = Tool::HSV_EQUALIZER, + .children = {}, }, { .id = Tool::FILM_SIMULATION, + .children = {}, }, { .id = Tool::FILM_NEGATIVE, + .children = {}, }, { .id = Tool::SOFT_LIGHT, + .children = {}, }, { .id = Tool::RGB_CURVES, + .children = {}, }, { .id = Tool::COLOR_TONING, + .children = {}, }, { .id = Tool::ICM, + .children = {}, }, }; const std::vector ADVANCED_PANEL_TOOLS = { { .id = Tool::RETINEX_TOOL, + .children = {}, }, { .id = Tool::COLOR_APPEARANCE, + .children = {}, }, { .id = Tool::WAVELET, + .children = {}, }, }; const std::vector LOCALLAB_PANEL_TOOLS = { { .id = Tool::LOCALLAB, + .children = {}, }, }; const std::vector TRANSFORM_PANEL_TOOLS = { { .id = Tool::CROP_TOOL, + .children = {}, }, { .id = Tool::RESIZE_TOOL, .children = { { .id = Tool::PR_SHARPENING, + .children = {}, }, }, }, @@ -168,21 +203,27 @@ const std::vector TRANSFORM_PANEL_TOOLS = { .children = { { .id = Tool::ROTATE, + .children = {}, }, { .id = Tool::PERSPECTIVE, + .children = {}, }, { .id = Tool::LENS_PROF, + .children = {}, }, { .id = Tool::DISTORTION, + .children = {}, }, { .id = Tool::CA_CORRECTION, + .children = {}, }, { .id = Tool::VIGNETTING, + .children = {}, }, }, }, @@ -195,15 +236,19 @@ const std::vector RAW_PANEL_TOOLS = { { { .id = Tool::BAYER_PROCESS, + .children = {}, }, { .id = Tool::BAYER_RAW_EXPOSURE, + .children = {}, }, { .id = Tool::BAYER_PREPROCESS, + .children = {}, }, { .id = Tool::RAW_CA_CORRECTION, + .children = {}, }, }, }, @@ -214,30 +259,38 @@ const std::vector RAW_PANEL_TOOLS = { { { .id = Tool::XTRANS_PROCESS, + .children = {}, }, { .id = Tool::XTRANS_RAW_EXPOSURE, + .children = {}, }, }, }, }, { .id = Tool::RAW_EXPOSURE, + .children = {}, }, { .id = Tool::PREPROCESS_WB, + .children = {}, }, { .id = Tool::PREPROCESS, + .children = {}, }, { .id = Tool::DARKFRAME_TOOL, + .children = {}, }, { .id = Tool::FLATFIELD_TOOL, + .children = {}, }, { .id = Tool::PD_SHARPENING, + .children = {}, }, }; From 2a91962c48513fb8b24391aee046526587da1e21 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:35:07 -0800 Subject: [PATCH 8/8] Fix usage of deprecated Exiv2 function Exiv2::enableBMFF() is deprecated as of v0.28.3. Only the CMake flag EXIV2_ENABLE_BMFF is required to enable BMFF support. --- rtengine/metadata.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/metadata.cc b/rtengine/metadata.cc index add935899a..199b3e9578 100644 --- a/rtengine/metadata.cc +++ b/rtengine/metadata.cc @@ -579,7 +579,7 @@ void Exiv2Metadata::init() { cache_.reset(new ImageCache(IMAGE_CACHE_SIZE)); Exiv2::XmpParser::initialize(); -#ifdef EXV_ENABLE_BMFF +#if defined EXV_ENABLE_BMFF && !EXIV2_TEST_VERSION(0, 28, 3) Exiv2::enableBMFF(true); #endif }