From 0e1bd8891b447cc84b0761163fb644998a6c774f Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 15 May 2023 14:35:40 +0200 Subject: [PATCH] MT#57440 in `RTMP_ReadPacket()` variable 'didAlloc' set but not used Just removal of a few unsed variables: rtmp.c: In function 'RTMP_ReadPacket': rtmp.c:2854:7: warning: variable 'didAlloc' set but not used [-Wunused-but-set-variable] 2854 | int didAlloc = FALSE; | ^~~~~~~~ and this: rtmp.c:1393:35: warning: 'av_record' defined but not used [-Wunused-const-variable=] 1393 | #define SAVC(x) static const AVal av_##x = AVC(#x) | ^~~ rtmp.c:1706:1: note: in expansion of macro 'SAVC' 1706 | SAVC(record); | ^~~~ Change-Id: I8a2bc2c415b44c99b6d881fb7118475f4020c713 --- apps/rtmp/librtmp/rtmp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/rtmp/librtmp/rtmp.c b/apps/rtmp/librtmp/rtmp.c index 9f90945f..414e04be 100644 --- a/apps/rtmp/librtmp/rtmp.c +++ b/apps/rtmp/librtmp/rtmp.c @@ -1703,7 +1703,6 @@ SendFCUnpublish(RTMP *r) SAVC(publish); SAVC(live); -SAVC(record); static int SendPublish(RTMP *r) @@ -2851,7 +2850,6 @@ int RTMP_ReadPacket(RTMP *r, RTMPPacket *packet) uint8_t hbuf[RTMP_MAX_HEADER_SIZE] = { 0 }; unsigned char *header = hbuf; int nSize, hSize, nToRead, nChunk; - int didAlloc = FALSE; RTMP_Log(RTMP_LOGDEBUG2, "%s: fd=%d", __FUNCTION__, r->m_sb.sb_socket); @@ -2959,7 +2957,6 @@ int RTMP_ReadPacket(RTMP *r, RTMPPacket *packet) RTMP_Log(RTMP_LOGDEBUG, "%s, failed to allocate packet", __FUNCTION__); return FALSE; } - didAlloc = TRUE; packet->m_headerType = (hbuf[0] & 0xc0) >> 6; }