[vlc-devel] commit: C++ needs explicit casting ( Rafaël Carré )

git version control git at videolan.org
Sat May 24 18:29:04 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat May 24 18:30:36 2008 +0200| [86af35f2401ca1eb2da89a182d54bbe6c1540a2e]

C++ needs explicit casting

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86af35f2401ca1eb2da89a182d54bbe6c1540a2e
---

 include/vlc_fixups.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 10f5448..5550599 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -50,7 +50,7 @@ static inline char *strdup (const char *str)
 #ifndef HAVE_STRNLEN
 static inline size_t strnlen (const char *str, size_t max)
 {
-    const char *end = memchr (str, 0, max);
+    const char *end = (const char *) memchr (str, 0, max);
     return end ? (size_t)(end - str) : max;
 }
 #endif
@@ -59,7 +59,7 @@ static inline size_t strnlen (const char *str, size_t max)
 static inline char *strndup (const char *str, size_t max)
 {
     size_t len = strnlen (str, max);
-    char *res = malloc (len + 1);
+    char *res = (char *) malloc (len + 1);
     if (res)
     {
         memcpy (res, str, len);




More information about the vlc-devel mailing list