Skip to content

fix deprecated warning with DelByName. lock is already taken#10

Open
heitbaum wants to merge 1 commit into
vdr-projects:masterfrom
heitbaum:deprecated
Open

fix deprecated warning with DelByName. lock is already taken#10
heitbaum wants to merge 1 commit into
vdr-projects:masterfrom
heitbaum:deprecated

Conversation

@heitbaum

@heitbaum heitbaum commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

fixes:

connectionVTP.c: In member function 'bool cConnectionVTP::CmdDELR(const char*)': connectionVTP.c:2036:70: warning: 'void cRecordings::DelByName(const char*)' is deprecated: use explicit locking, deleting etc. [-Wdeprecated-declarations]
 2036 |                                                 Recordings->DelByName(recording->FileName());
      |                                                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/skins.h:18,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/osdbase.h:15,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/menuitems.h:15,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/plugin.h:14,
                 from ../common.h:15,
                 from ../server/connection.h:9,
                 from ../server/connectionVTP.h:4,
                 from connectionVTP.c:5:
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/recording.h:314:62: note: declared here
  314 |   [[deprecated("use explicit locking, deleting etc.")]] void DelByName(const char *FileName);
      |                                                              ^~~~~~~~~

@M-Reimer

Copy link
Copy Markdown
Member

I had a look at how VDR handles recording deletion:
vdr-projects/vdr@63abb60
Would it be a good idea to add your change in a new version check and also add the recording to "DeletedRecordings"?

After Delete() renames the file to .del, remove the recording from the
active Recordings list and add it to DeletedRecordings using explicit
locking, matching VDR's own pattern in svdrp.c.

fixes:
connectionVTP.c: In member function 'bool cConnectionVTP::CmdDELR(const char*)':
connectionVTP.c:2036:70: warning: 'void cRecordings::DelByName(const char*)' is deprecated: use explicit locking, deleting etc. [-Wdeprecated-declarations]
 2036 |                                                 Recordings->DelByName(recording->FileName());
      |                                                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/skins.h:18,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/osdbase.h:15,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/menuitems.h:15,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/plugin.h:14,
                 from ../common.h:15,
                 from ../server/connection.h:9,
                 from ../server/connectionVTP.h:4,
                 from connectionVTP.c:5:
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/vdr-2.8.1/recording.h:314:62: note: declared here
  314 |   [[deprecated("use explicit locking, deleting etc.")]] void DelByName(const char *FileName);
      |

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
@heitbaum

heitbaum commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

I had a look at how VDR handles recording deletion: vdr-projects/vdr@63abb60 Would it be a good idea to add your change in a new version check and also add the recording to "DeletedRecordings"?

updated to match vdr. thanks for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants