Explorar el Código

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

master
kpl hace 10 años
padre
commit
4dcd756f33
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6
    6
      cmFile.c

+ 6
- 6
cmFile.c Ver fichero

@@ -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));

Loading…
Cancelar
Guardar