Silenced -pedantic compiler warnings about type punning

This commit is contained in:
Thomas Schmitt 2008-01-17 14:53:08 +00:00
parent d6b3cfac76
commit f3a7ed194a
2 changed files with 17 additions and 12 deletions

View File

@ -866,6 +866,7 @@ int Xorriso_add_tree(struct XorrisO *xorriso, IsoDir *dir,
{
IsoImage *volume;
IsoNode *node;
IsoSymlink *iso_symlink;
int ret, target_is_dir, source_is_dir, source_is_link, fret, was_failure= 0;
int do_not_dive;
struct DirseQ *dirseq= NULL;
@ -1042,8 +1043,8 @@ cannot_lstat:;
/* <<< One should rather change libisofs so that iso_tree_add_node()
adds a disk_link as RR link, if RR is enabled */
ret= iso_tree_add_new_symlink(dir, img_name, link_target,
(IsoSymlink **) &node);
ret= iso_tree_add_new_symlink(dir, img_name, link_target, &iso_symlink);
node= (IsoNode *) iso_symlink;
if(ret>0) {
ret= Xorriso_transfer_properties(xorriso, &stbuf, node, 0);
if(ret<=0)
@ -2563,7 +2564,7 @@ int Xorriso_rename(struct XorrisO *xorriso, char *origin, char *dest, int flag)
char *leafname, eff_origin[SfileadrL], sfe2[5*SfileadrL], *old_leafname;
IsoImage *volume;
IsoDir *origin_dir, *dest_dir;
IsoNode *node;
IsoNode *node, *iso_node;
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, origin, eff_origin, 0);
if(ret<=0)
@ -2637,13 +2638,15 @@ int Xorriso_rename(struct XorrisO *xorriso, char *origin, char *dest, int flag)
ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret<=0)
return(ret);
Xorriso_node_from_path(xorriso, volume, dir_adr, (IsoNode **) &dest_dir, 0);
Xorriso_node_from_path(xorriso, volume, dir_adr, &iso_node, 0);
dest_dir= (IsoDir *) iso_node;
strcpy(dir_adr, eff_origin);
cpt= strrchr(dir_adr, '/');
if(cpt==NULL)
cpt= dir_adr+strlen(dir_adr);
*cpt= 0;
Xorriso_node_from_path(xorriso, volume, dir_adr, (IsoNode **) &origin_dir, 0);
Xorriso_node_from_path(xorriso, volume, dir_adr, &iso_node, 0);
origin_dir= (IsoDir *) iso_node;
Xorriso_node_from_path(xorriso, volume, eff_origin, &node, 0);
if(dest_dir==NULL || origin_dir==NULL || node==NULL) {
Xorriso_process_msg_queues(xorriso,0);
@ -2820,6 +2823,7 @@ int Xorriso_expand_pattern(struct XorrisO *xorriso,
char sfe[5*SfileadrL];
IsoImage *volume;
IsoDir *dir= NULL, *root_dir;
IsoNode *iso_node;
*filec= 0;
*filev= NULL;
@ -2853,8 +2857,8 @@ int Xorriso_expand_pattern(struct XorrisO *xorriso,
It is not an error if xorriso->wdi does not exist yet, but one may
not use it as base for relative address searches.
*/
ret= Xorriso_node_from_path(xorriso, volume,
xorriso->wdi, (IsoNode **) &dir, 1);
ret= Xorriso_node_from_path(xorriso, volume, xorriso->wdi, &iso_node, 1);
dir= (IsoDir *) iso_node;
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
@ -3067,7 +3071,7 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
int ret, action= 0;
IsoDirIter *iter= NULL;
IsoDir *dir_node;
IsoNode *node;
IsoNode *node, *iso_node;
IsoImage *volume;
struct stat stbuf;
char *name;
@ -3096,11 +3100,12 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
ret= Xorriso_make_abs_adr(xorriso, xorriso->wdi, dir_path, path, 1|2|4);
if(ret<=0)
goto ex;
ret= Xorriso_node_from_path(xorriso, volume, path,(IsoNode **) &dir_node,0);
ret= Xorriso_node_from_path(xorriso, volume, path, &iso_node, 0);
dir_node= (IsoDir *) iso_node;
if(ret<=0)
{ret= 0; goto ex;}
ret= Xorriso_fake_stbuf(xorriso, "", dir_stbuf,
(IsoNode **) &dir_node, 1);
ret= Xorriso_fake_stbuf(xorriso, "", dir_stbuf, &iso_node, 1);
dir_node= (IsoDir *) iso_node;
if(ret<=0)
goto ex;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.01.16.200942"
#define Xorriso_timestamP "2008.01.17.145135"