Display "Install data" size statistics as unsigned number. (Partial fix for bug #3564918)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6283 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2012-11-12 21:24:37 +00:00
parent 6d71b946e3
commit 8217b2c61f
2 changed files with 15 additions and 15 deletions

View file

@ -2709,7 +2709,7 @@ int CEXEBuild::write_output(void)
int ns=build_sections.getlen()/sizeof(section); int ns=build_sections.getlen()/sizeof(section);
section *s=(section*)build_sections.get(); section *s=(section*)build_sections.get();
int x; int x;
int req=0; unsigned int req=0;
for (x = 1; x < ns; x ++) for (x = 1; x < ns; x ++)
{ {
if (!s[x].name_ptr || s[x].flags & SF_RO) req++; if (!s[x].name_ptr || s[x].flags & SF_RO) req++;
@ -2717,7 +2717,7 @@ int CEXEBuild::write_output(void)
INFO_MSG(_T("%d section%s"),ns,ns==1?_T(""):_T("s")); INFO_MSG(_T("%d section%s"),ns,ns==1?_T(""):_T("s"));
if (req) if (req)
{ {
INFO_MSG(_T(" (%d required)"),req); INFO_MSG(_T(" (%u required)"),req);
} }
INFO_MSG(_T(" (%d bytes), "), build_sections.getlen()); INFO_MSG(_T(" (%d bytes), "), build_sections.getlen());
} }
@ -2738,7 +2738,7 @@ int CEXEBuild::write_output(void)
int ns=ubuild_sections.getlen()/sizeof(section); int ns=ubuild_sections.getlen()/sizeof(section);
section *s=(section*)ubuild_sections.get(); section *s=(section*)ubuild_sections.get();
int x; int x;
int req=0; unsigned int req=0;
for (x = 1; x < ns; x ++) for (x = 1; x < ns; x ++)
{ {
if (!s[x].name_ptr || s[x].flags & SF_RO) req++; if (!s[x].name_ptr || s[x].flags & SF_RO) req++;
@ -2746,7 +2746,7 @@ int CEXEBuild::write_output(void)
INFO_MSG(_T("%d section%s"),ns,ns==1?_T(""):_T("s")); INFO_MSG(_T("%d section%s"),ns,ns==1?_T(""):_T("s"));
if (req) if (req)
{ {
INFO_MSG(_T(" (%d required)"),req); INFO_MSG(_T(" (%u required)"),req);
} }
INFO_MSG(_T(" (%d bytes), "), ubuild_sections.getlen()); INFO_MSG(_T(" (%d bytes), "), ubuild_sections.getlen());
} }
@ -2774,7 +2774,7 @@ int CEXEBuild::write_output(void)
unsigned int total_usize=m_exehead_original_size; unsigned int total_usize=m_exehead_original_size;
INFO_MSG(_T("EXE header size: %10d / %d bytes\n"),m_exehead_size,m_exehead_original_size); INFO_MSG(_T("EXE header size: %10u / %u bytes\n"),m_exehead_size,m_exehead_original_size);
if (build_compress_whole) { if (build_compress_whole) {
INFO_MSG(_T("Install code: (%d bytes)\n"), INFO_MSG(_T("Install code: (%d bytes)\n"),
@ -2789,17 +2789,17 @@ int CEXEBuild::write_output(void)
total_usize+=sizeof(fh)+fh.length_of_header; total_usize+=sizeof(fh)+fh.length_of_header;
{ {
int dbsize, dbsizeu; unsigned int dbsize, dbsizeu;
dbsize = build_datablock.getlen(); dbsize = build_datablock.getlen();
if (uninstall_size>0) dbsize -= uninstall_size; if (uninstall_size>0) dbsize -= uninstall_size;
if (build_compress_whole) { if (build_compress_whole) {
dbsizeu = dbsize; dbsizeu = dbsize;
INFO_MSG(_T("Install data: (%d bytes)\n"),dbsizeu); INFO_MSG(_T("Install data: (%u bytes)\n"),dbsizeu);
} }
else { else {
dbsizeu = db_full_size - uninstall_size_full; dbsizeu = db_full_size - uninstall_size_full;
INFO_MSG(_T("Install data: %10d / %d bytes\n"),dbsize,dbsizeu); INFO_MSG(_T("Install data: %10u / %u bytes\n"),dbsize,dbsizeu);
} }
total_usize += dbsizeu; total_usize += dbsizeu;
} }
@ -3287,7 +3287,7 @@ void CEXEBuild::set_uninstall_mode(int un)
SWAP(db_opt_save_u,db_opt_save,int); SWAP(db_opt_save_u,db_opt_save,int);
SWAP(db_comp_save_u,db_comp_save,int); SWAP(db_comp_save_u,db_comp_save,int);
SWAP(db_full_size_u,db_full_size,int); SWAP(db_full_size_u,db_full_size,unsigned int);
} }
} }

View file

@ -444,8 +444,8 @@ class CEXEBuild {
StringList m_macro_entry; StringList m_macro_entry;
int db_opt_save, db_comp_save, db_full_size, db_opt_save_u, int db_opt_save, db_opt_save_u, db_comp_save, db_comp_save_u;
db_comp_save_u, db_full_size_u; unsigned int db_full_size, db_full_size_u;
FastStringList include_dirs; FastStringList include_dirs;