On 15.06.2011 15:21, Paul Menzel wrote:
Dear VDR folks,


using Cppcheck 1.49 [1] to check VDR 1.7.18 the above error is shown.
Unfortunately I do not know how to fix this.

The following methods are the following (from two files).

         void cRecordings::TouchUpdate(void)
         {
           bool needsUpdate = NeedsUpdate();
           TouchFile(UpdateFileName());
           if (!needsUpdate)
              lastUpdate = time(NULL); // make sure we don't tigger ourselves
         }

         const char *cRecordings::UpdateFileName(void)
         {
           if (!updateFileName)
              updateFileName = strdup(AddDirectory(VideoDirectory, ".update"));
           return updateFileName;
         }

         void TouchFile(const char *FileName)
         {
           if (utime(FileName, NULL) == -1&&  errno != ENOENT)
              LOG_ERROR_STR(FileName);
         }


Thanks,

Paul


[1] http://cppcheck.sourceforge.net/

The update file name is initialized exactly once and lives until
the end of the program. There is no need to delete it, the
memory will be released when the program ends.

Klaus

_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to