Bug 140979

Summary: local variable used before set
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: unix2dosAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-12 13:55:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Binderman 2004-11-27 10:19:39 UTC
Description of problem:

I just tried to compile package unix2dos-2.2-24 from 
Redhat Fedora Core 3.

The compiler said

unix2dos.c(253): remark #592: variable "TempPath" is used before its
value is set

The source code is

  char *TempPath;
  struct stat StatBuf;
  struct utimbuf UTimeBuf;
  int fd;

  /* retrieve ipInFN file date stamp */
  if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf))
    RetVal = -1;

  strcpy (TempPath, "./u2dtmpXXXXXX");

Suggest init TempPath before first use.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tim Waugh 2005-04-12 13:55:09 UTC

*** This bug has been marked as a duplicate of 153079 ***