mirror of
https://github.com/yaobinwen/dpkg.git
synced 2026-01-12 08:20:35 +00:00
dselect: Use static_cast<> instead of old-style type qualifier cast
Warned-by: g++ -Wcast-qual
This commit is contained in:
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -189,6 +189,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
|
||||
- dselect: Reorder branches in packagelist::deselect_one_of so that they
|
||||
are not duplicated.
|
||||
- dselect: Use nullptr instead of NULL.
|
||||
- dselect: Use static_cast<> instead of old-style type qualifier cast.
|
||||
* Build system:
|
||||
- Bump minimal Perl version to 5.24.1.
|
||||
- Add a serial versioning to the m4 files.
|
||||
|
||||
@ -64,8 +64,8 @@ void baselist::sigwinchhandler(int) {
|
||||
}
|
||||
|
||||
static void cu_sigwinch(int, void **argv) {
|
||||
struct sigaction *osigactp= (struct sigaction*)argv[0];
|
||||
sigset_t *oblockedp= (sigset_t*)argv[1];
|
||||
struct sigaction *osigactp = static_cast<struct sigaction *>(argv[0]);
|
||||
sigset_t *oblockedp = static_cast<sigset_t *>(argv[1]);
|
||||
|
||||
if (sigaction(SIGWINCH, osigactp, nullptr))
|
||||
ohshite(_("failed to restore old SIGWINCH sigact"));
|
||||
|
||||
@ -354,8 +354,8 @@ void cursesoff() {
|
||||
}
|
||||
|
||||
urqresult urq_list(void) {
|
||||
modstatdb_open((modstatdb_rw)(msdbrw_writeifposs |
|
||||
msdbrw_available_readonly));
|
||||
modstatdb_open(static_cast<modstatdb_rw>(msdbrw_writeifposs |
|
||||
msdbrw_available_readonly));
|
||||
|
||||
curseson();
|
||||
|
||||
|
||||
@ -151,8 +151,10 @@ void packagelist::addheading(enum ssavailval ssavail,
|
||||
static packagelist *sortpackagelist;
|
||||
|
||||
int qsort_compareentries(const void *a, const void *b) {
|
||||
return sortpackagelist->compareentries(*(const struct perpackagestate **)a,
|
||||
*(const struct perpackagestate **)b);
|
||||
const struct perpackagestate *pa = *static_cast<const struct perpackagestate * const *>(a);
|
||||
const struct perpackagestate *pb = *static_cast<const struct perpackagestate * const *>(b);
|
||||
|
||||
return sortpackagelist->compareentries(pa, pb);
|
||||
}
|
||||
|
||||
void packagelist::sortinplace() {
|
||||
|
||||
Reference in New Issue
Block a user