Browse Source

Remove pointless #undefs of previously forbidden functions.

tags/n1.1
Anton Khirnov 13 years ago
parent
commit
cb45553f57
28 changed files with 0 additions and 57 deletions
  1. +0
    -1
      libavcodec/golomb-test.c
  2. +0
    -1
      libavcodec/iirfilter.c
  3. +0
    -2
      libavcodec/libfaac.c
  4. +0
    -3
      libavdevice/libcdio.c
  5. +0
    -2
      libavdevice/libdc1394.c
  6. +0
    -2
      libavdevice/timefilter.c
  7. +0
    -3
      libavfilter/filtfmts.c
  8. +0
    -2
      libavfilter/vf_drawtext.c
  9. +0
    -2
      libavformat/network.c
  10. +0
    -2
      libavformat/output-example.c
  11. +0
    -3
      libavformat/seek-test.c
  12. +0
    -3
      libavformat/url-test.c
  13. +0
    -2
      libavformat/utils.c
  14. +0
    -1
      libavutil/avstring.c
  15. +0
    -2
      libavutil/base64.c
  16. +0
    -2
      libavutil/blowfish.c
  17. +0
    -1
      libavutil/cpu.c
  18. +0
    -1
      libavutil/crc.c
  19. +0
    -3
      libavutil/des.c
  20. +0
    -1
      libavutil/eval.c
  21. +0
    -2
      libavutil/fifo.c
  22. +0
    -2
      libavutil/log.c
  23. +0
    -1
      libavutil/md5.c
  24. +0
    -5
      libavutil/mem.c
  25. +0
    -2
      libavutil/opt.c
  26. +0
    -3
      libavutil/parseutils.c
  27. +0
    -1
      libavutil/sha.c
  28. +0
    -2
      libavutil/xtea.c

+ 0
- 1
libavcodec/golomb-test.c View File

@@ -25,7 +25,6 @@
#include "golomb.h" #include "golomb.h"
#include "put_bits.h" #include "put_bits.h"


#undef fprintf
#define COUNT 8191 #define COUNT 8191
#define SIZE (COUNT * 4) #define SIZE (COUNT * 4)




+ 0
- 1
libavcodec/iirfilter.c View File

@@ -312,7 +312,6 @@ av_cold void ff_iir_filter_free_coeffs(struct FFIIRFilterCoeffs *coeffs)
} }


#ifdef TEST #ifdef TEST
#undef printf
#include <stdio.h> #include <stdio.h>


#define FILT_ORDER 4 #define FILT_ORDER 4


+ 0
- 2
libavcodec/libfaac.c View File

@@ -159,9 +159,7 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
memcpy(avctx->extradata, buffer, avctx->extradata_size); memcpy(avctx->extradata, buffer, avctx->extradata_size);
faac_cfg->outputFormat = 0; faac_cfg->outputFormat = 0;
} }
#undef free
free(buffer); free(buffer);
#define free please_use_av_free
} }


if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) {


+ 0
- 3
libavdevice/libcdio.c View File

@@ -33,9 +33,6 @@
#include "libavformat/avformat.h" #include "libavformat/avformat.h"
#include "libavformat/internal.h" #include "libavformat/internal.h"


/* cdio returns some malloced strings that need to be free()d */
#undef free

typedef struct CDIOContext { typedef struct CDIOContext {
AVClass *class; AVClass *class;
cdrom_drive_t *drive; cdrom_drive_t *drive;


+ 0
- 2
libavdevice/libdc1394.c View File

@@ -48,8 +48,6 @@
#define DC1394_FRAMERATE_240 FRAMERATE_240 #define DC1394_FRAMERATE_240 FRAMERATE_240
#endif #endif


#undef free

typedef struct dc1394_data { typedef struct dc1394_data {
AVClass *class; AVClass *class;
#if HAVE_LIBDC1394_1 #if HAVE_LIBDC1394_1


+ 0
- 2
libavdevice/timefilter.c View File

@@ -78,8 +78,6 @@ double ff_timefilter_update(TimeFilter *self, double system_time, double period)
#include "libavutil/lfg.h" #include "libavutil/lfg.h"
#define LFG_MAX ((1LL << 32) - 1) #define LFG_MAX ((1LL << 32) - 1)


#undef printf

int main(void) int main(void)
{ {
AVLFG prng; AVLFG prng;


+ 0
- 3
libavfilter/filtfmts.c View File

@@ -25,9 +25,6 @@
#include "libavfilter/avfilter.h" #include "libavfilter/avfilter.h"
#include "libavfilter/formats.h" #include "libavfilter/formats.h"


#undef fprintf
#undef printf

int main(int argc, char **argv) int main(int argc, char **argv)
{ {
AVFilter *filter; AVFilter *filter;


+ 0
- 2
libavfilter/vf_drawtext.c View File

@@ -46,8 +46,6 @@
#include "internal.h" #include "internal.h"
#include "video.h" #include "video.h"


#undef time

#include <ft2build.h> #include <ft2build.h>
#include <freetype/config/ftheader.h> #include <freetype/config/ftheader.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H


+ 0
- 2
libavformat/network.c View File

@@ -57,8 +57,6 @@ static unsigned long openssl_thread_id(void)
#if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00 #if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00
#include <gcrypt.h> #include <gcrypt.h>
#include <errno.h> #include <errno.h>
#undef malloc
#undef free
GCRY_THREAD_OPTION_PTHREAD_IMPL; GCRY_THREAD_OPTION_PTHREAD_IMPL;
#endif #endif
#endif #endif


+ 0
- 2
libavformat/output-example.c View File

@@ -38,8 +38,6 @@
#include "libavformat/avformat.h" #include "libavformat/avformat.h"
#include "libswscale/swscale.h" #include "libswscale/swscale.h"


#undef exit

/* 5 seconds stream duration */ /* 5 seconds stream duration */
#define STREAM_DURATION 5.0 #define STREAM_DURATION 5.0
#define STREAM_FRAME_RATE 25 /* 25 images/s */ #define STREAM_FRAME_RATE 25 /* 25 images/s */


+ 0
- 3
libavformat/seek-test.c View File

@@ -28,9 +28,6 @@
#include "libavutil/mathematics.h" #include "libavutil/mathematics.h"
#include "libavformat/avformat.h" #include "libavformat/avformat.h"


#undef printf
#undef fprintf

static char buffer[20]; static char buffer[20];


static const char *ret_str(int v) static const char *ret_str(int v)


+ 0
- 3
libavformat/url-test.c View File

@@ -20,9 +20,6 @@


#include "internal.h" #include "internal.h"


#undef printf
#undef exit

static void test(const char *base, const char *rel) static void test(const char *base, const char *rel)
{ {
char buf[200], buf2[200]; char buf[200], buf2[200];


+ 0
- 2
libavformat/utils.c View File

@@ -3092,7 +3092,6 @@ static void hex_dump_internal(void *avcl, FILE *f, int level,
const uint8_t *buf, int size) const uint8_t *buf, int size)
{ {
int len, i, j, c; int len, i, j, c;
#undef fprintf
#define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0) #define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0)


for(i=0;i<size;i+=16) { for(i=0;i<size;i+=16) {
@@ -3130,7 +3129,6 @@ void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)


static void pkt_dump_internal(void *avcl, FILE *f, int level, AVPacket *pkt, int dump_payload, AVRational time_base) static void pkt_dump_internal(void *avcl, FILE *f, int level, AVPacket *pkt, int dump_payload, AVRational time_base)
{ {
#undef fprintf
#define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0) #define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0)
PRINT("stream #%d:\n", pkt->stream_index); PRINT("stream #%d:\n", pkt->stream_index);
PRINT(" keyframe=%d\n", ((pkt->flags & AV_PKT_FLAG_KEY) != 0)); PRINT(" keyframe=%d\n", ((pkt->flags & AV_PKT_FLAG_KEY) != 0));


+ 0
- 1
libavutil/avstring.c View File

@@ -159,7 +159,6 @@ int av_strncasecmp(const char *a, const char *b, size_t n)
#ifdef TEST #ifdef TEST


#include "common.h" #include "common.h"
#undef printf


int main(void) int main(void)
{ {


+ 0
- 2
libavutil/base64.c View File

@@ -101,8 +101,6 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)


#ifdef TEST #ifdef TEST


#undef printf

#define MAX_DATA_SIZE 1024 #define MAX_DATA_SIZE 1024
#define MAX_ENCODED_SIZE 2048 #define MAX_ENCODED_SIZE 2048




+ 0
- 2
libavutil/blowfish.c View File

@@ -428,7 +428,6 @@ void av_blowfish_crypt(AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,


#ifdef TEST #ifdef TEST
#include <stdio.h> #include <stdio.h>
#undef printf


#define NUM_VARIABLE_KEY_TESTS 34 #define NUM_VARIABLE_KEY_TESTS 34


@@ -531,7 +530,6 @@ static const uint8_t ciphertext2[16] = {


#define IV "blowfish" #define IV "blowfish"


#undef exit
static void test_blowfish(AVBlowfish *ctx, uint8_t *dst, const uint8_t *src, static void test_blowfish(AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
const uint8_t *ref, int len, uint8_t *iv, int dir, const uint8_t *ref, int len, uint8_t *iv, int dir,
const char *test) const char *test)


+ 0
- 1
libavutil/cpu.c View File

@@ -111,7 +111,6 @@ int av_parse_cpu_flags(const char *s)


#ifdef TEST #ifdef TEST


#undef printf
#include <stdio.h> #include <stdio.h>


static const struct { static const struct {


+ 0
- 1
libavutil/crc.c View File

@@ -113,7 +113,6 @@ uint32_t av_crc(const AVCRC *ctx, uint32_t crc,
} }


#ifdef TEST #ifdef TEST
#undef printf
int main(void) int main(void)
{ {
uint8_t buf[1999]; uint8_t buf[1999];


+ 0
- 3
libavutil/des.c View File

@@ -337,9 +337,6 @@ void av_des_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count) {
} }


#ifdef TEST #ifdef TEST
#undef printf
#undef rand
#undef srand
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "libavutil/time.h" #include "libavutil/time.h"


+ 0
- 1
libavutil/eval.c View File

@@ -545,7 +545,6 @@ int av_expr_parse_and_eval(double *d, const char *s,
} }


#ifdef TEST #ifdef TEST
#undef printf
#include <string.h> #include <string.h>


static const double const_values[] = { static const double const_values[] = {


+ 0
- 2
libavutil/fifo.c View File

@@ -130,8 +130,6 @@ void av_fifo_drain(AVFifoBuffer *f, int size)


#ifdef TEST #ifdef TEST


#undef printf

int main(void) int main(void)
{ {
/* create a FIFO buffer */ /* create a FIFO buffer */


+ 0
- 2
libavutil/log.c View File

@@ -55,7 +55,6 @@ static const uint8_t color[] = { 0x41, 0x41, 0x11, 0x03, 9, 0x02, 0x06 };
#endif #endif
static int use_color = -1; static int use_color = -1;


#undef fprintf
static void colored_fputs(int level, const char *str) static void colored_fputs(int level, const char *str)
{ {
if (use_color < 0) { if (use_color < 0) {
@@ -104,7 +103,6 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
if (level > av_log_level) if (level > av_log_level)
return; return;
line[0] = 0; line[0] = 0;
#undef fprintf
if (print_prefix && avc) { if (print_prefix && avc) {
if (avc->parent_log_context_offset) { if (avc->parent_log_context_offset) {
AVClass** parent = *(AVClass ***) (((uint8_t *) ptr) + AVClass** parent = *(AVClass ***) (((uint8_t *) ptr) +


+ 0
- 1
libavutil/md5.c View File

@@ -182,7 +182,6 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len)
} }


#ifdef TEST #ifdef TEST
#undef printf
#include <stdio.h> #include <stdio.h>


static void print_md5(uint8_t *md5) static void print_md5(uint8_t *md5)


+ 0
- 5
libavutil/mem.c View File

@@ -38,11 +38,6 @@
#include "intreadwrite.h" #include "intreadwrite.h"
#include "mem.h" #include "mem.h"


/* here we can use OS-dependent allocation functions */
#undef free
#undef malloc
#undef realloc

#ifdef MALLOC_PREFIX #ifdef MALLOC_PREFIX


#define malloc AV_JOIN(MALLOC_PREFIX, malloc) #define malloc AV_JOIN(MALLOC_PREFIX, malloc)


+ 0
- 2
libavutil/opt.c View File

@@ -685,8 +685,6 @@ const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *pre


#ifdef TEST #ifdef TEST


#undef printf

typedef struct TestContext typedef struct TestContext
{ {
const AVClass *class; const AVClass *class;


+ 0
- 3
libavutil/parseutils.c View File

@@ -498,7 +498,6 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
char lastch; char lastch;
int negative = 0; int negative = 0;


#undef time
time_t now = time(0); time_t now = time(0);


len = strlen(timestr); len = strlen(timestr);
@@ -643,8 +642,6 @@ int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info


#ifdef TEST #ifdef TEST


#undef printf

int main(void) int main(void)
{ {
printf("Testing av_parse_video_rate()\n"); printf("Testing av_parse_video_rate()\n");


+ 0
- 1
libavutil/sha.c View File

@@ -334,7 +334,6 @@ void av_sha_final(AVSHA* ctx, uint8_t *digest)


#ifdef TEST #ifdef TEST
#include <stdio.h> #include <stdio.h>
#undef printf


int main(void) int main(void)
{ {


+ 0
- 2
libavutil/xtea.c View File

@@ -101,7 +101,6 @@ void av_xtea_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count,


#ifdef TEST #ifdef TEST
#include <stdio.h> #include <stdio.h>
#undef printf


#define XTEA_NUM_TESTS 6 #define XTEA_NUM_TESTS 6


@@ -138,7 +137,6 @@ static const uint8_t xtea_test_ct[XTEA_NUM_TESTS][8] = {
{ 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 } { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }
}; };


#undef exit
static void test_xtea(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, static void test_xtea(AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
const uint8_t *ref, int len, uint8_t *iv, int dir, const uint8_t *ref, int len, uint8_t *iv, int dir,
const char *test) const char *test)


Loading…
Cancel
Save