[vlc-commits] misc: remove unused vlc_error_string()

Rémi Denis-Courmont git at videolan.org
Tue May 28 19:03:08 CEST 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 19 20:24:23 2019 +0300| [32bc2c18cf15af0b07ef25227620111f2f39fb0e] | committer: Rémi Denis-Courmont

misc: remove unused vlc_error_string()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32bc2c18cf15af0b07ef25227620111f2f39fb0e
---

 include/vlc_common.h |  2 --
 po/POTFILES.in       |  1 -
 src/Makefile.am      |  1 -
 src/libvlccore.sym   |  1 -
 src/misc/error.c     | 67 ----------------------------------------------------
 5 files changed, 72 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index c2e14e4209..0bbb98fd62 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -945,8 +945,6 @@ static inline bool mul_overflow(unsigned long long a, unsigned long long b,
 
 #define EMPTY_STR(str) (!str || !*str)
 
-VLC_API const char *vlc_error_string(int) VLC_USED;
-
 #include <vlc_arrays.h>
 
 /* MSB (big endian)/LSB (little endian) conversions - network order is always
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 61b8aadedc..0d2676c321 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -93,7 +93,6 @@ src/libvlc-module.c
 src/misc/actions.c
 src/misc/block.c
 src/misc/cpu.c
-src/misc/error.c
 src/misc/es_format.c
 src/misc/events.c
 src/misc/filter_chain.c
diff --git a/src/Makefile.am b/src/Makefile.am
index bc6694586f..f39793aa0c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -369,7 +369,6 @@ libvlccore_la_SOURCES = \
 	misc/objres.c \
 	misc/variables.h \
 	misc/variables.c \
-	misc/error.c \
 	misc/xml.c \
 	misc/addons.c \
 	misc/filter.c \
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 3e6a4428b2..083ddef896 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -533,7 +533,6 @@ vlc_sem_wait
 vlc_control_cancel
 vlc_GetCPUCount
 vlc_CPU
-vlc_error_string
 vlc_event_attach
 vlc_event_detach
 vlc_filenamecmp
diff --git a/src/misc/error.c b/src/misc/error.c
deleted file mode 100644
index 80c1f9b08d..0000000000
--- a/src/misc/error.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * error.c: error handling routine
- *****************************************************************************
- * Copyright (C) 2002-2004 VLC authors and VideoLAN
- *
- * Authors: Samuel Hocevar <sam at zoy.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-
-/*****************************************************************************
- * vlc_error_string: strerror() equivalent
- *****************************************************************************
- * This function returns a string describing the error code passed in the
- * argument. A list of all errors can be found in include/vlc_common.h.
- *****************************************************************************/
-const char *vlc_error_string(int i_err)
-{
-    switch( i_err )
-    {
-        case VLC_SUCCESS:
-            return "no error";
-
-        case VLC_ENOMEM:
-            return "not enough memory";
-        case VLC_ETIMEOUT:
-            return "timeout";
-
-        case VLC_ENOMOD:
-            return "module not found";
-
-        case VLC_ENOOBJ:
-            return "object not found";
-
-        case VLC_ENOVAR:
-            return "variable not found";
-        case VLC_EBADVAR:
-            return "bad variable value";
-
-        case VLC_EGENERIC:
-            return "generic error";
-        default:
-            return "unknown error";
-    }
-}
-



More information about the vlc-commits mailing list