Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-08-26 05:51:46 +0300
committerCampbell Barton <campbell@blender.org>2022-08-26 05:51:46 +0300
commit6fc7b37583a2fa0815ae50b8c604f823d863cab1 (patch)
treebbb02a7a513e43a634739c93904f5b23ad913ae0 /source/blender/imbuf/intern/tiff.c
parenta3e1a9e2aace26a71c2698cd96ce4086db25e94d (diff)
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/imbuf/intern/tiff.c')
-rw-r--r--source/blender/imbuf/intern/tiff.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index dae6ef49c6d..1989566fc32 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -549,10 +549,8 @@ ImBuf *imb_loadtiff(const unsigned char *mem,
ImbTIFFMemFile memFile;
uint32_t width, height;
char *format = NULL;
- int level;
short spp;
int ib_depth;
- int found;
/* Check whether or not we have a TIFF file. */
if (imb_is_a_tiff(mem, size) == 0) {
@@ -592,8 +590,7 @@ ImBuf *imb_loadtiff(const unsigned char *mem,
if (flags & IB_alphamode_detect) {
if (spp == 4) {
unsigned short extra, *extraSampleTypes;
-
- found = TIFFGetField(image, TIFFTAG_EXTRASAMPLES, &extra, &extraSampleTypes);
+ const int found = TIFFGetField(image, TIFFTAG_EXTRASAMPLES, &extra, &extraSampleTypes);
if (found && (extraSampleTypes[0] == EXTRASAMPLE_ASSOCALPHA)) {
ibuf->flags |= IB_alphamode_premul;
@@ -617,7 +614,7 @@ ImBuf *imb_loadtiff(const unsigned char *mem,
int numlevel = TIFFNumberOfDirectories(image);
/* create empty mipmap levels in advance */
- for (level = 0; level < numlevel; level++) {
+ for (int level = 0; level < numlevel; level++) {
if (!TIFFSetDirectory(image, level)) {
break;
}