changeset 24796:8dfda4d651ec

_vorbis_block_alloc() is used w/o prototype, this will crash on ia64. Add a header file with the function prototype to address this issue. This has the positive side effect of fixing a couple of implicit declaration warnings. The problem was originally reported as Debian bug 447278. patch by Dann Frazier and Andrea Mennucci, mennucc1 debian org
author diego
date Sat, 20 Oct 2007 22:41:24 +0000
parents deb3d1cc2852
children c2cacd6ed07c
files tremor/block.c tremor/block.h tremor/floor0.c tremor/floor1.c tremor/res012.c tremor/synthesis.c tremor/tremor.diff
diffstat 7 files changed, 106 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tremor/block.c	Sat Oct 20 22:28:14 2007 +0000
+++ b/tremor/block.c	Sat Oct 20 22:41:24 2007 +0000
@@ -25,6 +25,7 @@
 #include "window.h"
 #include "registry.h"
 #include "misc.h"
+#include "block.h"
 
 static int ilog(unsigned int v){
   int ret=0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tremor/block.h	Sat Oct 20 22:41:24 2007 +0000
@@ -0,0 +1,24 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE.   *
+ *                                                                  *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: basic shared block operations
+
+ ********************************************************************/
+
+#ifndef _V_BLOCK_H_
+#define _V_BLOCK_H_
+
+void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
+void _vorbis_block_ripcord(vorbis_block *vb);
+
+#endif
--- a/tremor/floor0.c	Sat Oct 20 22:28:14 2007 +0000
+++ b/tremor/floor0.c	Sat Oct 20 22:41:24 2007 +0000
@@ -25,6 +25,7 @@
 #include "codebook.h"
 #include "misc.h"
 #include "os.h"
+#include "block.h"
 
 #define LSP_FRACBITS 14
 
--- a/tremor/floor1.c	Sat Oct 20 22:28:14 2007 +0000
+++ b/tremor/floor1.c	Sat Oct 20 22:41:24 2007 +0000
@@ -24,6 +24,7 @@
 #include "registry.h"
 #include "codebook.h"
 #include "misc.h"
+#include "block.h"
 
 #define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */
 
--- a/tremor/res012.c	Sat Oct 20 22:28:14 2007 +0000
+++ b/tremor/res012.c	Sat Oct 20 22:41:24 2007 +0000
@@ -25,6 +25,7 @@
 #include "codebook.h"
 #include "misc.h"
 #include "os.h"
+#include "block.h"
 
 typedef struct {
   vorbis_info_residue0 *info;
--- a/tremor/synthesis.c	Sat Oct 20 22:28:14 2007 +0000
+++ b/tremor/synthesis.c	Sat Oct 20 22:41:24 2007 +0000
@@ -23,6 +23,7 @@
 #include "registry.h"
 #include "misc.h"
 #include "os.h"
+#include "block.h"
 
 int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
   vorbis_dsp_state     *vd=vb->vd;
--- a/tremor/tremor.diff	Sat Oct 20 22:28:14 2007 +0000
+++ b/tremor/tremor.diff	Sat Oct 20 22:41:24 2007 +0000
@@ -107,3 +107,80 @@
  	    int val=VFLOAT_MULTI(delta,delpoint,
  				 abs(b->quantlist[j*b->dim+k]),&point);
  
+--- block.h	(revision 0)
++++ block.h	(revision 0)
+@@ -0,0 +1,24 @@
++/********************************************************************
++ *                                                                  *
++ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE.   *
++ *                                                                  *
++ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
++ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
++ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
++ *                                                                  *
++ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
++ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
++ *                                                                  *
++ ********************************************************************
++
++ function: basic shared block operations
++
++ ********************************************************************/
++
++#ifndef _V_BLOCK_H_
++#define _V_BLOCK_H_
++
++void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
++void _vorbis_block_ripcord(vorbis_block *vb);
++
++#endif
+--- floor0.c	(revision 24821)
++++ floor0.c	(working copy)
+@@ -25,6 +25,7 @@
+ #include "codebook.h"
+ #include "misc.h"
+ #include "os.h"
++#include "block.h"
+ 
+ #define LSP_FRACBITS 14
+ 
+--- floor1.c	(revision 24821)
++++ floor1.c	(working copy)
+@@ -24,6 +24,7 @@
+ #include "registry.h"
+ #include "codebook.h"
+ #include "misc.h"
++#include "block.h"
+ 
+ #define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */
+ 
+--- synthesis.c	(revision 24821)
++++ synthesis.c	(working copy)
+@@ -23,6 +23,7 @@
+ #include "registry.h"
+ #include "misc.h"
+ #include "os.h"
++#include "block.h"
+ 
+ int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
+   vorbis_dsp_state     *vd=vb->vd;
+--- res012.c	(revision 24821)
++++ res012.c	(working copy)
+@@ -25,6 +25,7 @@
+ #include "codebook.h"
+ #include "misc.h"
+ #include "os.h"
++#include "block.h"
+ 
+ typedef struct {
+   vorbis_info_residue0 *info;
+--- block.c	(revision 24821)
++++ block.c	(working copy)
+@@ -25,6 +25,7 @@
+ #include "window.h"
+ #include "registry.h"
+ #include "misc.h"
++#include "block.h"
+ 
+ static int ilog(unsigned int v){
+   int ret=0;