From a1659823861bcd38cb7abb1eb27bc0461f3c0d39 Mon Sep 17 00:00:00 2001 From: re2zero Date: Thu, 20 Nov 2025 17:12:18 +0800 Subject: [PATCH] fix: [cppcheck] extract options setting into dedicated function. Create a dedicated function to handle the assignment of command line parameters to global variables, improving code clarity and separation of concerns in the tiffcp utility. Log: extract options setting into dedicated function. --- 3rdparty/tiff-tools/tiffcp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/3rdparty/tiff-tools/tiffcp.c b/3rdparty/tiff-tools/tiffcp.c index 7a2b162b..2cdbf034 100644 --- a/3rdparty/tiff-tools/tiffcp.c +++ b/3rdparty/tiff-tools/tiffcp.c @@ -97,6 +97,13 @@ static TIFF* bias = NULL; static int pageNum = 0; static int pageInSeq = 0; +static void setOptions(int i, int p) +{ + /*set options which will be set by command line options in main() */ + ignore = i; + pageInSeq = p; +} + static int nextSrcImage (TIFF *tif, char **imageSpec) /* seek to the next image specified in *imageSpec