]> granicus.if.org Git - file/commitdiff
add cast for C++ build.
authorChristos Zoulas <christos@zoulas.com>
Fri, 17 May 2019 02:24:59 +0000 (02:24 +0000)
committerChristos Zoulas <christos@zoulas.com>
Fri, 17 May 2019 02:24:59 +0000 (02:24 +0000)
src/softmagic.c

index 82948e6357d449680c9de51be8ba2e8f10b403b5..2edae41df4da356c91c66b5312b3fdeec7a919d3 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.285 2019/05/09 18:58:57 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.286 2019/05/17 02:24:59 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -2078,7 +2078,8 @@ magiccheck(struct magic_set *ms, struct magic *m)
                        idx = m->str_range + slen;
                        if (m->str_range == 0 || ms->search.s_len < idx)
                                idx = ms->search.s_len;
-                       found = memmem(ms->search.s, idx, m->value.s, slen);
+                       found = CAST(const char *, memmem(ms->search.s, idx,
+                           m->value.s, slen));
                        if (!found)
                                return 0;
                        idx = found - ms->search.s;