udp: Fix a compilation warning

Message ID 1309423987-19950-1-git-send-email-martin@martin.st
State Committed
Commit 5d62d0b114807cc143079a8a0430b86d585ab606
Headers show

Commit Message

Martin Storsjö June 30, 2011, 8:53 a.m.
This fixes this compilation warning, by making endptr a non-const
pointer, as required by strtol:
In function ‘udp_open’:
warning: passing argument 2 of ‘strtol’ from incompatible pointer type
---
 libavformat/udp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Diego Biurrun June 30, 2011, 9:02 a.m. | #1
On Thu, Jun 30, 2011 at 11:53:07AM +0300, Martin Storsjö wrote:
> This fixes this compilation warning, by making endptr a non-const
> pointer, as required by strtol:
> In function ‘udp_open’:
> warning: passing argument 2 of ‘strtol’ from incompatible pointer type

OK

Diego

Patch

diff --git a/libavformat/udp.c b/libavformat/udp.c
index 724ff01..bd95a81 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -328,7 +328,7 @@  static int udp_open(URLContext *h, const char *uri, int flags)
     p = strchr(uri, '?');
     if (p) {
         if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {
-            const char *endptr=NULL;
+            char *endptr = NULL;
             s->reuse_socket = strtol(buf, &endptr, 10);
             /* assume if no digits were found it is a request to enable it */
             if (buf == endptr)