look if you are using global optimization,
CW put 2 (or mor) variables in the same address if one of them will not be
used later.
when you debug looks like the variable changes.
one solution is use this variable for something later in the function so CW
have to preserve the address of the variable unique.
other option is declare variable as static or volatile.
Ricardo
----- Original Message -----
From: "Rob" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[email protected]>
Sent: Thursday, April 20, 2006 6:41 AM
Subject: More NVFS Wierdness?
Hi,
I have a snippet of code to get the modification number of a database that
I've saved to the treo's nvfs volume
error=VFSFileOpen (volRefNum,PREFS_BACKUP,vfsModeRead,&fileRef); if
(!error)
{
VFSFileDBInfo
(fileRef,NULL,NULL,NULL,&dateNum,NULL,NULL,&modNum,NULL,NULL,NULL,NULL,NULL);
VFSFileClose(fileRef);
AppDoubleToStr(disp,modNum,0);
AppCopyTextToField(frmP,BackupBackupModField,disp,false); }
if I put a debug point on VFSFileDBInfo then it returns the correct value.
If I clear the debug point and stop a couple of lines later, it returns 0
or 1 (for modnum).
This is the same build running in the same debug session, the only thing
changing is that I turn the breakpoint on and off in codewarrior
I have repeated this many times to be sure.
I've tried putting a SysTaskDelay before and after VFSFileDBInfo (50ticks)
Any ideas?
Thanks in advance,
Rob
--
For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/