[libbluray-devel] Added missing static. Generate warnings for functions without prototypes.
hpi1
git at videolan.org
Wed Sep 26 15:26:39 CEST 2012
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Sep 26 16:00:02 2012 +0300| [22b453fd422b763a07ac749fe3b057dd2296a7f1] | committer: hpi1
Added missing static. Generate warnings for functions without prototypes.
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=22b453fd422b763a07ac749fe3b057dd2296a7f1
---
configure.ac | 2 ++
src/examples/bdj_test.c | 4 ++--
src/examples/mpls_dump.c | 2 +-
src/libbluray/bluray.c | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9f04060..900a0cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,6 +197,8 @@ check_cc_options -Wtype-limits && \
SET_WARNINGS="$SET_WARNINGS -Wtype-limits"
check_cc_options -Wundef && \
SET_WARNINGS="$SET_WARNINGS -Wundef"
+check_cc_options -Wmissing-prototypes && \
+ SET_WARNINGS="$SET_WARNINGS -Wmissing-prototypes"
# no implicit function declarations
check_cc_options -Werror-implicit-function-declaration && \
diff --git a/src/examples/bdj_test.c b/src/examples/bdj_test.c
index bb8a46f..769aac7 100644
--- a/src/examples/bdj_test.c
+++ b/src/examples/bdj_test.c
@@ -32,14 +32,14 @@
#include "libbluray/bluray.h"
-void usage(void) {
+static void _usage(void) {
printf("Usage: [path to disc] [starting object]\n");
}
int main(int argc, char** argv)
{
if (argc < 3) {
- usage();
+ _usage();
return 0;
}
diff --git a/src/examples/mpls_dump.c b/src/examples/mpls_dump.c
index 24c7f6c..447a6ba 100644
--- a/src/examples/mpls_dump.c
+++ b/src/examples/mpls_dump.c
@@ -116,7 +116,7 @@ const VALUE_MAP subpath_type_map[] = {
{0,NULL}
};
-const char*
+static const char*
_lookup_str(const VALUE_MAP *map, int val)
{
int ii;
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index d06b047..cb12319 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2398,7 +2398,7 @@ int bd_play(BLURAY *bd)
return _play_title(bd, BLURAY_TITLE_FIRST_PLAY);
}
-int _try_play_title(BLURAY *bd, unsigned title)
+static int _try_play_title(BLURAY *bd, unsigned title)
{
if (bd->title_type == title_undef && title != BLURAY_TITLE_FIRST_PLAY) {
BD_DEBUG(DBG_BLURAY|DBG_CRIT, "bd_play_title(): bd_play() not called\n");
More information about the libbluray-devel
mailing list