Avoid declaring unused variables

Move the variable declarations within the ifdef instead.
This commit is contained in:
Martin Storsjö 2014-02-18 12:46:33 +02:00
parent e441ae2fd5
commit fd100598ab

View File

@ -542,14 +542,15 @@ int ParseCommandLine (int argc, char** argv, SEncParamExt& pSvcParam, SFilesSet&
}
else if (!strcmp (pCommand, "-drec") && (n + 1 < argc)) {
#ifdef ENABLE_FRAME_DUMP
unsigned int iLayer = atoi (argv[n++]);
const int iLen = strlen (argv[n]);
#ifdef ENABLE_FRAME_DUMP
SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
pDLayer->sRecFileName[iLen] = '\0';
strncpy (pDLayer->sRecFileName, argv[n], iLen); // confirmed_safe_unsafe_usage
strncpy (pDLayer->sRecFileName, argv[n++], iLen); // confirmed_safe_unsafe_usage
#else
n += 2;
#endif//ENABLE_FRAME_DUMP
n++;
}
else if (!strcmp (pCommand, "-sw") && (n + 1 < argc)) {