Reacted on warnings of PLD Linux build log
This commit is contained in:
parent
3f29d70aba
commit
7aa2582129
@ -1734,7 +1734,7 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
|||||||
int sa_type;
|
int sa_type;
|
||||||
Ecma119Image *target;
|
Ecma119Image *target;
|
||||||
IsoImageWriter *writer;
|
IsoImageWriter *writer;
|
||||||
int el_torito_writer_index = -1, file_src_writer_index = -1;
|
int file_src_writer_index = -1;
|
||||||
int system_area_options = 0;
|
int system_area_options = 0;
|
||||||
char *system_area = NULL;
|
char *system_area = NULL;
|
||||||
int write_count = 0, write_count_mem;
|
int write_count = 0, write_count_mem;
|
||||||
@ -2073,7 +2073,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
goto target_cleanup;
|
goto target_cleanup;
|
||||||
}
|
}
|
||||||
el_torito_writer_index = target->nwriters - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create writer for Joliet structure */
|
/* create writer for Joliet structure */
|
||||||
|
@ -477,8 +477,8 @@ static
|
|||||||
int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer)
|
int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer)
|
||||||
{
|
{
|
||||||
Ecma119Image *t;
|
Ecma119Image *t;
|
||||||
uint32_t i, link_blocks, hfsp_curblock;
|
uint32_t i, hfsp_curblock;
|
||||||
uint32_t block_fac, cat_node_size, block_size;
|
uint32_t block_fac, block_size;
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_OUT_OF_MEM;
|
||||||
@ -487,7 +487,6 @@ int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
t = writer->target;
|
t = writer->target;
|
||||||
block_size = t->hfsp_block_size;
|
block_size = t->hfsp_block_size;
|
||||||
block_fac = t->hfsp_iso_block_fac;
|
block_fac = t->hfsp_iso_block_fac;
|
||||||
cat_node_size = t->hfsp_cat_node_size;
|
|
||||||
|
|
||||||
iso_msg_debug(t->image->id, "(b) curblock=%d, nodes =%d", t->curblock, t->hfsp_nnodes);
|
iso_msg_debug(t->image->id, "(b) curblock=%d, nodes =%d", t->curblock, t->hfsp_nnodes);
|
||||||
t->hfsp_part_start = t->curblock * block_fac;
|
t->hfsp_part_start = t->curblock * block_fac;
|
||||||
@ -500,7 +499,7 @@ int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
t->hfsp_catalog_file_start = hfsp_curblock;
|
t->hfsp_catalog_file_start = hfsp_curblock;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
hfsp_curblock += (t->hfsp_nnodes * cat_node_size + block_size - 1) / block_size;
|
hfsp_curblock += (t->hfsp_nnodes * t->hfsp_cat_node_size + block_size - 1) / block_size;
|
||||||
*/
|
*/
|
||||||
hfsp_curblock += 2 * t->hfsp_nnodes;
|
hfsp_curblock += 2 * t->hfsp_nnodes;
|
||||||
|
|
||||||
@ -509,7 +508,6 @@ int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
|
|
||||||
iso_msg_debug(t->image->id, "(d) hfsp_curblock=%d, nodes =%d", hfsp_curblock, t->hfsp_nnodes);
|
iso_msg_debug(t->image->id, "(d) hfsp_curblock=%d, nodes =%d", hfsp_curblock, t->hfsp_nnodes);
|
||||||
|
|
||||||
link_blocks = 0;
|
|
||||||
for (i = 0; i < t->hfsp_nleafs; i++)
|
for (i = 0; i < t->hfsp_nleafs; i++)
|
||||||
if (t->hfsp_leafs[i].unix_type == UNIX_SYMLINK)
|
if (t->hfsp_leafs[i].unix_type == UNIX_SYMLINK)
|
||||||
{
|
{
|
||||||
@ -1227,7 +1225,7 @@ int update_symlink(Ecma119Image *target, uint32_t changed_idx, char *new_name,
|
|||||||
char *orig_dest, *orig_start, *orig_end;
|
char *orig_dest, *orig_start, *orig_end;
|
||||||
char *hfsp_dest, *hfsp_start, *hfsp_end;
|
char *hfsp_dest, *hfsp_start, *hfsp_end;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned int comp_len, orig_len, hfsp_len, hfsp_comp_len;
|
unsigned int comp_len, orig_len, hfsp_len;
|
||||||
|
|
||||||
if (target->hfsp_leafs[link_idx].node->type != LIBISO_SYMLINK)
|
if (target->hfsp_leafs[link_idx].node->type != LIBISO_SYMLINK)
|
||||||
return ISO_SUCCESS;
|
return ISO_SUCCESS;
|
||||||
@ -1271,7 +1269,6 @@ int update_symlink(Ecma119Image *target, uint32_t changed_idx, char *new_name,
|
|||||||
hfsp_end = strchr(hfsp_start, '/');
|
hfsp_end = strchr(hfsp_start, '/');
|
||||||
if (hfsp_end == NULL)
|
if (hfsp_end == NULL)
|
||||||
hfsp_end = hfsp_start + strlen(hfsp_start);
|
hfsp_end = hfsp_start + strlen(hfsp_start);
|
||||||
hfsp_comp_len = hfsp_end - hfsp_start;
|
|
||||||
|
|
||||||
if (comp_len == 0 || (comp_len == 1 && orig_start[0] == '.'))
|
if (comp_len == 0 || (comp_len == 1 && orig_start[0] == '.'))
|
||||||
continue;
|
continue;
|
||||||
|
@ -406,6 +406,7 @@ static
|
|||||||
int dir_update_size(IsoImage *image, IsoDir *dir)
|
int dir_update_size(IsoImage *image, IsoDir *dir)
|
||||||
{
|
{
|
||||||
IsoNode *pos;
|
IsoNode *pos;
|
||||||
|
int ret;
|
||||||
|
|
||||||
#ifdef Libisofs_update_sizes_abortablE
|
#ifdef Libisofs_update_sizes_abortablE
|
||||||
char *path= NULL;
|
char *path= NULL;
|
||||||
@ -416,7 +417,6 @@ int dir_update_size(IsoImage *image, IsoDir *dir)
|
|||||||
|
|
||||||
pos = dir->children;
|
pos = dir->children;
|
||||||
while (pos) {
|
while (pos) {
|
||||||
int ret = 1;
|
|
||||||
if (pos->type == LIBISO_FILE) {
|
if (pos->type == LIBISO_FILE) {
|
||||||
ret = iso_stream_update_size(ISO_FILE(pos)->stream);
|
ret = iso_stream_update_size(ISO_FILE(pos)->stream);
|
||||||
} else if (pos->type == LIBISO_DIR) {
|
} else if (pos->type == LIBISO_DIR) {
|
||||||
@ -428,6 +428,8 @@ int dir_update_size(IsoImage *image, IsoDir *dir)
|
|||||||
return ret; /* Message already issued by dir_update_size */
|
return ret; /* Message already issued by dir_update_size */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Libisofs_update_sizes_abortablE
|
#ifdef Libisofs_update_sizes_abortablE
|
||||||
@ -465,7 +467,12 @@ int dir_update_size(IsoImage *image, IsoDir *dir)
|
|||||||
return cancel_ret; /* cancel due error threshold */
|
return cancel_ret; /* cancel due error threshold */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* Libisofs_update_sizes_abortablE */
|
#else
|
||||||
|
|
||||||
|
if (ret < 0)
|
||||||
|
ret = 1; /* ignore error */
|
||||||
|
|
||||||
|
#endif /* ! Libisofs_update_sizes_abortablE */
|
||||||
|
|
||||||
pos = pos->next;
|
pos = pos->next;
|
||||||
}
|
}
|
||||||
|
@ -563,7 +563,7 @@ int make_isolinux_mbr(int32_t *img_blocks, Ecma119Image *t,
|
|||||||
uint32_t id, part, nominal_part_size;
|
uint32_t id, part, nominal_part_size;
|
||||||
off_t hd_img_blocks, hd_boot_lba;
|
off_t hd_img_blocks, hd_boot_lba;
|
||||||
char *wpt;
|
char *wpt;
|
||||||
uint32_t boot_lba, mbr_id;
|
uint32_t boot_lba;
|
||||||
int head_count, sector_count, ret;
|
int head_count, sector_count, ret;
|
||||||
int gpt_count = 0, gpt_idx[128], apm_count = 0, gpt_cursor;
|
int gpt_count = 0, gpt_idx[128], apm_count = 0, gpt_cursor;
|
||||||
/* For generating a weak random number */
|
/* For generating a weak random number */
|
||||||
@ -573,7 +573,6 @@ int make_isolinux_mbr(int32_t *img_blocks, Ecma119Image *t,
|
|||||||
hd_img_blocks = ((off_t) *img_blocks) * (off_t) 4;
|
hd_img_blocks = ((off_t) *img_blocks) * (off_t) 4;
|
||||||
|
|
||||||
boot_lba = t->bootsrc[0]->sections[0].block;
|
boot_lba = t->bootsrc[0]->sections[0].block;
|
||||||
mbr_id = 0;
|
|
||||||
head_count = t->partition_heads_per_cyl;
|
head_count = t->partition_heads_per_cyl;
|
||||||
sector_count = t->partition_secs_per_head;
|
sector_count = t->partition_secs_per_head;
|
||||||
|
|
||||||
@ -608,6 +607,8 @@ int make_isolinux_mbr(int32_t *img_blocks, Ecma119Image *t,
|
|||||||
gettimeofday(&tv, &tz);
|
gettimeofday(&tv, &tz);
|
||||||
id = 0xffffffff & (tv.tv_sec ^ (tv.tv_usec * 2000));
|
id = 0xffffffff & (tv.tv_sec ^ (tv.tv_usec * 2000));
|
||||||
lsb_to_buf(&wpt, id, 32, 0);
|
lsb_to_buf(&wpt, id, 32, 0);
|
||||||
|
} else {
|
||||||
|
wpt+= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* write word 0 # Offset 444
|
/* write word 0 # Offset 444
|
||||||
|
Loading…
Reference in New Issue
Block a user