more C89-fixes

going down to strict -ansi c89 is quite overkill (no 'inline',
and /* */-style comments).
But with these fixes, the code compiles with the stringent flags:
 -Wextra -Wold-style-definition -Wmissing-prototypes
 -Wmissing-declarations and -Wdeclaration-after-statement

Change-Id: I36222f8f505bcba3d9d1309ad98b5ccb04ec17e3
This commit is contained in:
Pascal Massimino
2011-03-25 15:04:11 -07:00
parent 0de013b3a4
commit f8db5d5d1c
20 changed files with 63 additions and 42 deletions

View File

@ -21,9 +21,11 @@ extern "C" {
static uint8_t clip1[255 + 510 + 1]; // clips [-255,510] to [0,255]
static int tables_ok = 0;
// We declare this variable 'volatile' to prevent instruction reordering
// and make sure it's set to true _last_ (so as to be thread-safe)
static volatile int tables_ok = 0;
static void InitTables() {
static void InitTables(void) {
if (!tables_ok) {
int i;
for (i = -255; i <= 255 + 255; ++i) {
@ -79,7 +81,7 @@ static void ITransform(const uint8_t* ref, const int16_t* in, uint8_t* dst) {
}
}
void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) {
static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) {
int i;
int tmp[16];
for (i = 0; i < 4; ++i, src += BPS, ref += BPS) {
@ -636,7 +638,7 @@ VP8BlockCopy VP8Copy16x16 = Copy16x16;
//-----------------------------------------------------------------------------
void VP8EncDspInit() {
void VP8EncDspInit(void) {
InitTables();
}