Skip to content

Commit 6c7719d

Browse files
committed
Fixed compilation with clang.
Thanks to Dmitry Tsidilin.
1 parent 2fb11df commit 6c7719d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ngx_rtmp_handler.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,10 @@ ngx_rtmp_prepare_message(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
570570
{
571571
ngx_chain_t *l;
572572
u_char *p, *pp;
573-
ngx_int_t hsize, thsize, nbufs;
573+
ngx_int_t hsize, thsize;
574+
#if (NGX_DEBUG)
575+
ngx_int_t nbufs;
576+
#endif
574577
uint32_t mlen, timestamp, ext_timestamp;
575578
static uint8_t hdrsize[] = { 12, 8, 4, 1 };
576579
u_char th[7];
@@ -591,10 +594,14 @@ ngx_rtmp_prepare_message(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
591594

592595
/* detect packet size */
593596
mlen = 0;
597+
#if (NGX_DEBUG)
594598
nbufs = 0;
599+
#endif
595600
for(l = out; l; l = l->next) {
596601
mlen += (l->buf->last - l->buf->pos);
602+
#if (NGX_DEBUG)
597603
++nbufs;
604+
#endif
598605
}
599606

600607
fmt = 0;

0 commit comments

Comments
 (0)