uint32_t mentrycount[MAGIC_SETS] = { 0 };
uint32_t i, j;
size_t files = 0, maxfiles = 0;
- char **filearr = NULL, *mfn;
+ char **filearr = NULL;
struct stat st;
struct magic_map *map;
php_stream *dir;
int mflen;
char mfn[MAXPATHLEN];
- dir = php_stream_opendir(fn, REPORT_ERRORS, NULL);
+ dir = php_stream_opendir((char *)fn, REPORT_ERRORS, NULL);
if (!dir) {
errs++;
goto out;
#ifdef PHP_WIN32
/* Don't bother on windows with php_stream_open_wrapper,
return to give apprentice_load() a chance. */
- if (php_stream_stat_path_ex(fn, 0, &st, NULL) == SUCCESS) {
+ if (php_stream_stat_path_ex((char *)fn, 0, &st, NULL) == SUCCESS) {
if (st.sb.st_mode & S_IFDIR) {
goto error;
}
goto out;
}
- if (php_stream_write(stream, map->nmagic, nm) != (ssize_t)nm) {
+ if (php_stream_write(stream, (const char *)map->nmagic, nm) != (ssize_t)nm) {
file_error(ms, errno, "error writing `%s'", dbname);
goto out;
}
for (i = 0; i < MAGIC_SETS; i++) {
len = m * map->nmagic[i];
- if (php_stream_write(stream, map->magic[i], len) != (ssize_t)len) {
+ if (php_stream_write(stream, (const char *)map->magic[i], len) != (ssize_t)len) {
file_error(ms, errno, "error writing `%s'", dbname);
goto out;
}
# undef S_IFIFO
#endif
-private void free_mlist(struct mlist *);
private void close_and_restore(const struct magic_set *, const char *, int,
const struct stat *);
private int unreadable_info(struct magic_set *, mode_t, const char *);
+#if 0
private const char* get_default_magic(void);
+#endif
private const char *file_or_stream(struct magic_set *, const char *, php_stream *);
#ifndef STDIN_FILENO
#include "php.h"
#include "file.h"
+#include "cdf.h"
#ifndef lint
FILE_RCSID("@(#)$File: print.c,v 1.76 2013/02/26 18:25:00 christos Exp $")
TSRMLS_FETCH();
va_start(va, f);
- vasprintf(&expanded_format, f, va);
+ if (vasprintf(&expanded_format, f, va)); /* silence */
va_end(va);
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Warning: %s", expanded_format);