mirror of
https://github.com/curl/curl.git
synced 2025-09-29 07:26:48 +03:00
RTMP: Fix compiler warnings
This commit is contained in:
parent
9e480973eb
commit
d3c813e726
3
CHANGES
3
CHANGES
|
@ -6,6 +6,9 @@
|
||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
- Julien Chaffraix fixed the warning seen when compiling lib/rtmp.c: one
|
||||||
|
unused variables, several unused arguments and some missing #include.
|
||||||
|
|
||||||
- Julien Chaffraix fixed 2 OOM errors: a missing NULL-check in
|
- Julien Chaffraix fixed 2 OOM errors: a missing NULL-check in
|
||||||
lib/http_negociate.c and a potential NULL dereferencing in lib/splay.c
|
lib/http_negociate.c and a potential NULL dereferencing in lib/splay.c
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
#ifdef USE_LIBRTMP
|
#ifdef USE_LIBRTMP
|
||||||
|
|
||||||
#include "urldata.h"
|
#include "urldata.h"
|
||||||
|
#include "nonblock.h" /* for curlx_nonblock */
|
||||||
|
#include "progress.h" /* for Curl_pgrsSetUploadSize */
|
||||||
|
#include "transfer.h"
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <librtmp/rtmp.h>
|
#include <librtmp/rtmp.h>
|
||||||
|
|
||||||
|
@ -153,7 +156,6 @@ const struct Curl_handler Curl_handler_rtmpts = {
|
||||||
|
|
||||||
static CURLcode rtmp_setup(struct connectdata *conn)
|
static CURLcode rtmp_setup(struct connectdata *conn)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
RTMP *r = RTMP_Alloc();
|
RTMP *r = RTMP_Alloc();
|
||||||
|
|
||||||
if (!r)
|
if (!r)
|
||||||
|
@ -220,6 +222,10 @@ static CURLcode rtmp_do(struct connectdata *conn, bool *done)
|
||||||
static CURLcode rtmp_done(struct connectdata *conn, CURLcode status,
|
static CURLcode rtmp_done(struct connectdata *conn, CURLcode status,
|
||||||
bool premature)
|
bool premature)
|
||||||
{
|
{
|
||||||
|
(void)conn; /* unused */
|
||||||
|
(void)status; /* unused */
|
||||||
|
(void)premature; /* unused */
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,6 +246,8 @@ static ssize_t rtmp_recv(struct connectdata *conn, int sockindex, char *buf,
|
||||||
RTMP *r = conn->proto.generic;
|
RTMP *r = conn->proto.generic;
|
||||||
ssize_t nread;
|
ssize_t nread;
|
||||||
|
|
||||||
|
(void)sockindex; /* unused */
|
||||||
|
|
||||||
nread = RTMP_Read(r, buf, len);
|
nread = RTMP_Read(r, buf, len);
|
||||||
if (nread < 0) {
|
if (nread < 0) {
|
||||||
if (r->m_read.status == RTMP_READ_COMPLETE ||
|
if (r->m_read.status == RTMP_READ_COMPLETE ||
|
||||||
|
@ -258,6 +266,8 @@ static ssize_t rtmp_send(struct connectdata *conn, int sockindex,
|
||||||
RTMP *r = conn->proto.generic;
|
RTMP *r = conn->proto.generic;
|
||||||
ssize_t num;
|
ssize_t num;
|
||||||
|
|
||||||
|
(void)sockindex; /* unused */
|
||||||
|
|
||||||
num = RTMP_Write(r, (char *)buf, len);
|
num = RTMP_Write(r, (char *)buf, len);
|
||||||
if (num < 0) {
|
if (num < 0) {
|
||||||
*err = CURLE_SEND_ERROR;
|
*err = CURLE_SEND_ERROR;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user