av{codec,util}/tests: Remove pointless undefs

Before commit e96d90eed6 lavu/internal.h
contained redefined various discouraged/forbidden functions to induce
compilation failures upon use, like e.g.
 #define malloc please_use_av_malloc
In order to use these functions, some files had to undefine these
macros. This commit removes the remaining pointless undefs.

Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-11-21 13:58:22 +01:00
parent ee623a43e3
commit 2a90e7d725
14 changed files with 0 additions and 26 deletions

View File

@@ -32,8 +32,6 @@
#include "libavutil/bprint.h"
#include "libavutil/time_internal.h"
#undef time
static int insert_text(AVBPrint *dst, const char *in, const char *arg)
{
av_bprintf(dst, "%s", arg);

View File

@@ -36,8 +36,6 @@
#include "libavutil/mem.h"
#include "libavutil/time.h"
#undef printf
#define WIDTH 64
#define HEIGHT 64

View File

@@ -20,10 +20,6 @@
#include "libavcodec/snowenc.c"
#undef malloc
#undef free
#undef printf
#include "libavutil/lfg.h"
#include "libavutil/mathematics.h"
#include "libavutil/mem.h"

View File

@@ -22,8 +22,6 @@
#include "libavfilter/audio.h"
#include "libavfilter/formats.c"
#undef printf
const int64_t avfilter_all_channel_layouts[] = {
AV_CH_FRONT_CENTER,
AV_CH_FRONT_CENTER|AV_CH_LOW_FREQUENCY,

View File

@@ -905,7 +905,6 @@ static int expand_timestamps(void *log, struct sbg_script *s)
av_log(log, AV_LOG_WARNING,
"Scripts with mixed absolute and relative timestamps can give "
"unexpected results (pause, seeking, time zone change).\n");
#undef time
time(&now0);
tm = localtime_r(&now0, &tmpbuf);
now = tm ? tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec :

View File

@@ -120,7 +120,6 @@ int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *l
if(!ptr)
ptr= tempnam(".", prefix);
*filename = av_strdup(ptr);
#undef free
free(ptr);
#else
return AVERROR(ENOSYS);

View File

@@ -21,8 +21,6 @@
#include "libavutil/avassert.h"
#include "libavutil/bprint.c"
#undef printf
static void bprint_pascal(AVBPrint *b, unsigned size)
{
unsigned i, j;

View File

@@ -18,8 +18,6 @@
#include "libavutil/error.c"
#undef printf
int main(void)
{
int i;

View File

@@ -18,8 +18,6 @@
#include "libavutil/file.c"
#undef printf
int main(void)
{
uint8_t *buf;

View File

@@ -20,7 +20,6 @@
#include "libavutil/crc.h"
#include "libavutil/mem.h"
#undef printf
static int check_image_fill(enum AVPixelFormat pix_fmt, int w, int h) {
uint8_t *data[4];
size_t sizes[4];

View File

@@ -22,7 +22,6 @@
#include "libavutil/pca.c"
#include "libavutil/lfg.h"
#undef printf
#include <stdio.h>
#include <stdlib.h>

View File

@@ -21,7 +21,6 @@
#define TEST 1
#include "libavutil/random_seed.c"
#undef printf
#define N 256
#define F 2
#include <stdio.h>

View File

@@ -26,9 +26,7 @@
#include "libswresample/swresample.h"
#undef time
#include <time.h>
#undef fprintf
#define SAMPLES 1000

View File

@@ -29,9 +29,6 @@
#include "libavcodec/raw.h"
#include "libavcodec/raw_pix_fmt_tags.h"
#undef printf
#undef fprintf
#if !HAVE_GETOPT
#include "compat/getopt.c"
#endif