[vlc-devel] [PATCH] misc: remove unused vlc_error_string()
RĂ©mi Denis-Courmont
remi at remlab.net
Sun May 19 19:24:44 CEST 2019
---
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(-)
delete mode 100644 src/misc/error.c
diff --git a/include/vlc_common.h b/include/vlc_common.h
index 7bb8d27f58..ce5fb50708 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -950,8 +950,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 722fa705c8..967c316c48 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -94,7 +94,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 bc826dfefe..0dcb5e0bda 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -370,7 +370,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 efc07fbb25..25526844e4 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -537,7 +537,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";
- }
-}
-
--
2.20.1
More information about the vlc-devel
mailing list