Bug 462141 - Fix unreferenced local variable warning in libfishsound - r=kinetik

--HG--
extra : rebase_source : 12557d99b8380aaa69e268f09fc2c49a32e189d4
This commit is contained in:
Chris Double 2009-09-29 14:40:38 +13:00
Родитель 7f6049c07e
Коммит 1783bb21e2
4 изменённых файлов: 59 добавлений и 2 удалений

Просмотреть файл

@ -12,6 +12,6 @@ from git://git.xiph.org/libfishsound.git
endian.patch is applied to fix Bug 45269. endian.patch is applied to fix Bug 45269.
bug487519.patch: Fixes for bug487519 bug487519.patch: Fixes for bug487519
trac497.patch: Annodex trac ticket 497 fix and mozilla bug 462141.
fishsound_reset.patch: Fixes bug 516323. fishsound_reset.patch: Fixes bug 516323.

Просмотреть файл

@ -290,7 +290,9 @@ fish_sound_comment_next_byname (FishSound * fsound,
int int
fish_sound_comment_add (FishSound * fsound, FishSoundComment * comment) fish_sound_comment_add (FishSound * fsound, FishSoundComment * comment)
{ {
#if FS_ENCODE
FishSoundComment * new_comment; FishSoundComment * new_comment;
#endif
if (fsound == NULL) return FISH_SOUND_ERR_BAD; if (fsound == NULL) return FISH_SOUND_ERR_BAD;
@ -317,7 +319,9 @@ int
fish_sound_comment_add_byname (FishSound * fsound, const char * name, fish_sound_comment_add_byname (FishSound * fsound, const char * name,
const char * value) const char * value)
{ {
#if FS_ENCODE
FishSoundComment * comment; FishSoundComment * comment;
#endif
if (fsound == NULL) return FISH_SOUND_ERR_BAD; if (fsound == NULL) return FISH_SOUND_ERR_BAD;
@ -346,7 +350,9 @@ fish_sound_comment_add_byname (FishSound * fsound, const char * name,
int int
fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment) fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment)
{ {
#if FS_ENCODE
FishSoundComment * v_comment; FishSoundComment * v_comment;
#endif
if (fsound == NULL) return FISH_SOUND_ERR_BAD; if (fsound == NULL) return FISH_SOUND_ERR_BAD;
@ -372,8 +378,11 @@ fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment)
int int
fish_sound_comment_remove_byname (FishSound * fsound, char * name) fish_sound_comment_remove_byname (FishSound * fsound, char * name)
{ {
#if FS_ENCODE
FishSoundComment * comment; FishSoundComment * comment;
int i, ret = 0; int i;
#endif
int ret = 0;
if (fsound == NULL) return FISH_SOUND_ERR_BAD; if (fsound == NULL) return FISH_SOUND_ERR_BAD;

Просмотреть файл

@ -0,0 +1,47 @@
diff --git a/media/libfishsound/src/libfishsound/fishsound_comments.c b/media/libfishsound/src/libfishsound/fishsound_comments.c
index b71164f..414e210 100644
--- a/media/libfishsound/src/libfishsound/fishsound_comments.c
+++ b/media/libfishsound/src/libfishsound/fishsound_comments.c
@@ -290,7 +290,9 @@ fish_sound_comment_next_byname (FishSound * fsound,
int
fish_sound_comment_add (FishSound * fsound, FishSoundComment * comment)
{
+#if FS_ENCODE
FishSoundComment * new_comment;
+#endif
if (fsound == NULL) return FISH_SOUND_ERR_BAD;
@@ -317,7 +319,9 @@ int
fish_sound_comment_add_byname (FishSound * fsound, const char * name,
const char * value)
{
+#if FS_ENCODE
FishSoundComment * comment;
+#endif
if (fsound == NULL) return FISH_SOUND_ERR_BAD;
@@ -346,7 +350,9 @@ fish_sound_comment_add_byname (FishSound * fsound, const char * name,
int
fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment)
{
+#if FS_ENCODE
FishSoundComment * v_comment;
+#endif
if (fsound == NULL) return FISH_SOUND_ERR_BAD;
@@ -372,8 +378,11 @@ fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment)
int
fish_sound_comment_remove_byname (FishSound * fsound, char * name)
{
+#if FS_ENCODE
FishSoundComment * comment;
- int i, ret = 0;
+ int i;
+#endif
+ int ret = 0;
if (fsound == NULL) return FISH_SOUND_ERR_BAD;

Просмотреть файл

@ -41,5 +41,6 @@ cp $1/src/libfishsound/debug.h ./src/libfishsound/debug.h
cp $1/AUTHORS ./AUTHORS cp $1/AUTHORS ./AUTHORS
patch -p3 <endian.patch patch -p3 <endian.patch
patch -p3 <bug487519.patch patch -p3 <bug487519.patch
patch -p3 <trac497.patch
patch -p3 <fishsound_reset.patch patch -p3 <fishsound_reset.patch