summaryrefslogtreecommitdiffstats
path: root/playtree.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-24 10:39:04 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-24 10:39:04 +0000
commit123e80594d92bfb84fcf3136a5c99ae3c510d378 (patch)
tree6b7f59a52026c4acb4d3c55456873a8026c7339b /playtree.c
parent22d3fd45d97ed2830bb59fa64e656090935ef044 (diff)
downloadmpv-123e80594d92bfb84fcf3136a5c99ae3c510d378.tar.bz2
mpv-123e80594d92bfb84fcf3136a5c99ae3c510d378.tar.xz
Cast sizeof() to int in mp_msg arguments so it fits the format string on 64bit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23634 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'playtree.c')
-rw-r--r--playtree.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/playtree.c b/playtree.c
index 55b3d948c5..7ce7986b2a 100644
--- a/playtree.c
+++ b/playtree.c
@@ -22,7 +22,7 @@ play_tree_t*
play_tree_new(void) {
play_tree_t* r = calloc(1,sizeof(play_tree_t));
if(r == NULL)
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",sizeof(play_tree_t));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(int)sizeof(play_tree_t));
r->entry_type = PLAY_TREE_ENTRY_NODE;
return r;
}
@@ -266,7 +266,7 @@ play_tree_add_file(play_tree_t* pt,char* file) {
}
pt->files = (char**)realloc(pt->files,(n+2)*sizeof(char*));
if(pt->files ==NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(n+2)*sizeof(char*));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(n+2)*(int)sizeof(char*));
return;
}
@@ -305,7 +305,7 @@ play_tree_remove_file(play_tree_t* pt,char* file) {
memmove(&pt->files[f],&pt->files[f+1],(n-f)*sizeof(char*));
pt->files = (char**)realloc(pt->files,n*sizeof(char*));
if(pt->files == NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(n+2)*sizeof(char*));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(n+2)*(int)sizeof(char*));
return -1;
}
} else {
@@ -340,7 +340,7 @@ play_tree_set_param(play_tree_t* pt, char* name, char* val) {
pt->params = (play_tree_param_t*)realloc(pt->params,(n+2)*sizeof(play_tree_param_t));
if(pt->params == NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't realloc params (%d bytes of memory)\n",(n+2)*sizeof(play_tree_param_t));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't realloc params (%d bytes of memory)\n",(n+2)*(int)sizeof(play_tree_param_t));
return;
}
pt->params[n].name = strdup(name);
@@ -375,7 +375,7 @@ play_tree_unset_param(play_tree_t* pt, char* name) {
memmove(&pt->params[ni],&pt->params[ni+1],(n-ni)*sizeof(play_tree_param_t));
pt->params = (play_tree_param_t*)realloc(pt->params,n*sizeof(play_tree_param_t));
if(pt->params == NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",n*sizeof(play_tree_param_t));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",n*(int)sizeof(play_tree_param_t));
return -1;
}
} else {
@@ -482,7 +482,7 @@ play_tree_iter_new(play_tree_t* pt,m_config_t* config) {
iter = calloc(1,sizeof(play_tree_iter_t));
if(! iter) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate new iterator (%d bytes of memory)\n",sizeof(play_tree_iter_t));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate new iterator (%d bytes of memory)\n",(int)sizeof(play_tree_iter_t));
return NULL;
}
iter->root = pt;
@@ -704,7 +704,7 @@ play_tree_iter_up_step(play_tree_iter_t* iter, int d,int with_nodes) {
iter->status_stack = NULL;
}
if(iter->stack_size > 0 && iter->status_stack == NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",iter->stack_size*sizeof(char*));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",iter->stack_size*(int)sizeof(char*));
return PLAY_TREE_ITER_ERROR;
}
iter->tree = iter->tree->parent;
@@ -738,7 +738,7 @@ play_tree_iter_down_step(play_tree_iter_t* iter, int d,int with_nodes) {
iter->stack_size++;
iter->status_stack = (int*)realloc(iter->status_stack,iter->stack_size*sizeof(int));
if(iter->status_stack == NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",iter->stack_size*sizeof(int));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",iter->stack_size*(int)sizeof(int));
return PLAY_TREE_ITER_ERROR;
}
iter->status_stack[iter->stack_size-1] = iter->loop;
@@ -831,7 +831,7 @@ play_tree_iter_new_copy(play_tree_iter_t* old) {
iter = malloc(sizeof(play_tree_iter_t));
if(iter == NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",sizeof(play_tree_iter_t));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(int)sizeof(play_tree_iter_t));
return NULL;
}
;
@@ -839,7 +839,7 @@ play_tree_iter_new_copy(play_tree_iter_t* old) {
if(old->status_stack) {
iter->status_stack = malloc(old->stack_size * sizeof(int));
if(iter->status_stack == NULL) {
- mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",old->stack_size * sizeof(int));
+ mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",old->stack_size * (int)sizeof(int));
free(iter);
return NULL;
}