[libdvdnav-devel] [PATCH] libdvdread: dvd_input.c remove unused function parameters

Steve Dibb beandog at gentoo.org
Sat Apr 26 20:46:01 CEST 2014


Fixes compiler warnings:

src/dvd_input.c:186:37: warning: unused parameter 'dev' [-Wunused-parameter]
static char *file_error(dvd_input_t dev)
                                     ^
src/dvd_input.c:210:35: warning: unused parameter 'dev' [-Wunused-parameter]
static int file_title(dvd_input_t dev, int block)
                                   ^
src/dvd_input.c:210:44: warning: unused parameter 'block' 
[-Wunused-parameter]
static int file_title(dvd_input_t dev, int block)
                                            ^
src/dvd_input.c:218:69: warning: unused parameter 'flags' 
[-Wunused-parameter]
static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags)
                                                                     ^

Patch:

diff --git a/src/dvd_input.c b/src/dvd_input.c
index d7e2252..31aeb0c 100644
--- a/src/dvd_input.c
+++ b/src/dvd_input.c
@@ -183,7 +183,7 @@ static dvd_input_t file_open(const char *target)
  /**
   * return the last error message
   */
-static char *file_error(dvd_input_t dev)
+static char *file_error()
  {
    /* use strerror(errno)? */
    return (char *)"unknown error";
@@ -207,7 +207,7 @@ static int file_seek(dvd_input_t dev, int blocks)
  /**
   * set the block for the beginning of a new title (key).
   */
-static int file_title(dvd_input_t dev, int block)
+static int file_title()
  {
    return -1;
  }
@@ -215,7 +215,7 @@ static int file_title(dvd_input_t dev, int block)
  /**
   * read data from the device.
   */
-static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags)
+static int file_read(dvd_input_t dev, void *buffer, int blocks)
  {
    size_t len;
    ssize_t ret;


More information about the libdvdnav-devel mailing list