This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=428483f603e539f60e738f2ed1859b92852c3870 commit 428483f603e539f60e738f2ed1859b92852c3870 Author: Guillem Jover <[email protected]> AuthorDate: Sun Mar 25 05:08:22 2018 +0200 dselect: Do not use unnecessary old-style casts Warned-by: g++ -Wold-style-cast --- debian/changelog | 1 + dselect/baselist.cc | 2 +- dselect/pkgdepcon.cc | 2 +- dselect/pkginfo.cc | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index f3e83543d..02d5247e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -190,6 +190,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium are not duplicated. - dselect: Use nullptr instead of NULL. - dselect: Use static_cast<> instead of old-style type qualifier cast. + - dselect: Do not use unnecessary old-style casts. * Build system: - Bump minimal Perl version to 5.24.1. - Add a serial versioning to the m4 files. diff --git a/dselect/baselist.cc b/dselect/baselist.cc index d81cca812..9fc2733d9 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -390,7 +390,7 @@ void baselist::refreshinfo() { mvwaddstr(whatinfowin,0,0, whatinfovb.string()); if (infolines > info_height) { wprintw(whatinfowin,_(" -- %d%%, press "), - (int)((infotopofscreen + info_height) * 100.0 / infolines)); + (infotopofscreen + info_height) * 100 / infolines); if (infotopofscreen + info_height < infolines) { wprintw(whatinfowin,_("%s for more"), bindings->find("iscrollon")); if (infotopofscreen) waddstr(whatinfowin, ", "); diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc index f7c826a0c..e8e6cec7b 100644 --- a/dselect/pkgdepcon.cc +++ b/dselect/pkgdepcon.cc @@ -124,7 +124,7 @@ dep_update_best_to_change_stop(perpackagestate *& best, pkginfo *trythis) debug(dbg_depcon, "update_best_to_change(best=%s{%d}, test=%s{%d});", best ? pkg_name(best->pkg, pnaw_always) : "", - best ? (int)best->spriority : -1, + best ? best->spriority : -1, trythis->set->name, trythis->clientdata->spriority); // If the problem is caused by us deselecting one of these packages diff --git a/dselect/pkginfo.cc b/dselect/pkginfo.cc index 31a45994f..af21743e5 100644 --- a/dselect/pkginfo.cc +++ b/dselect/pkginfo.cc @@ -171,8 +171,8 @@ void packagelist::redrawinfo() { whatinfovb.reset(); werase(infopad); wmove(infopad,0,0); - debug(dbg_general, "packagelist[%p]::redrawinfo(); #=%d", - this, (int)(currentinfo - baseinfo)); + debug(dbg_general, "packagelist[%p]::redrawinfo(); #=%jd", + this, currentinfo - baseinfo); (this->*currentinfo->display)(); -- Dpkg.Org's dpkg

