Просмотр исходного кода

cmFile.c : Fixed potential uninitialized variable in cmFiileBackup().

master
kpl 10 лет назад
Родитель
Сommit
4dcd756f33
1 измененных файлов: 6 добавлений и 6 удалений
  1. 6
    6
      cmFile.c

+ 6
- 6
cmFile.c Просмотреть файл

@@ -423,11 +423,12 @@ cmFileRC_t    cmFileCopy(
423 423
 
424 424
 cmFileRC_t cmFileBackup( const cmChar_t* dir, const cmChar_t* name, const cmChar_t* ext, cmErr_t* err )
425 425
 {
426
-  cmFileRC_t      rc      = kOkFileRC;
427
-  cmChar_t*       newName = NULL;
428
-  const cmChar_t* newFn   = NULL;
429
-  unsigned        n       = 0;
430
-  const cmChar_t* srcFn   = NULL;
426
+  cmFileRC_t           rc      = kOkFileRC;
427
+  cmChar_t*            newName = NULL;
428
+  const cmChar_t*      newFn   = NULL;
429
+  unsigned             n       = 0;
430
+  const cmChar_t*      srcFn   = NULL;
431
+  cmFileSysPathPart_t* pp      = NULL;
431 432
 
432 433
   // form the name of the backup file
433 434
   if((srcFn = cmFsMakeFn(dir,name,ext,NULL)) == NULL )
@@ -441,7 +442,6 @@ cmFileRC_t cmFileBackup( const cmChar_t* dir, const cmChar_t* name, const cmChar
441 442
     return rc;
442 443
 
443 444
   // break the source file name up into dir/fn/ext.
444
-  cmFileSysPathPart_t* pp = NULL;
445 445
   if((pp = cmFsPathParts(srcFn)) == NULL || pp->fnStr==NULL)
446 446
   {
447 447
     rc = cmErrMsg(err,kFileSysFailFileRC,"The file name '%s' could not be parsed into its parts.",cmStringNullGuard(srcFn));

Загрузка…
Отмена
Сохранить