On Fri, Jun 27, 2008 at 07:13:50PM +0100, peter green <[EMAIL PROTECTED]> was heard to say: > tags 488132 +patch > thanks > > DO NOT SEND THIS MESSAGE YET > >> I'd like to verify the >> fix, but there doesn't seem to be an amd64 emulator in the archive... > > > I have added int casts to all the printf calls the compiler was > complaining about and the package now builds.
Ah, thanks -- that's why I wanted to check (I only knew about the first one, so the fix didn't fix it). > patch is attatched > > BTW in the qemu package I see > > /usr/bin/qemu-system-x86_64 > /usr/bin/qemu-x86_64 > > But I imagine they will be pretty slow. I'm fine with slow for this purpose. I actually checked qemu, but its package description said it doesn't have an emulator for x86_64 (or rather, that it only has them for powerpc, sparc, and x86). I'll file a bug about that. > for(vector<pkgCache::VerIterator>::size_type i = 0; > i < choices.size(); ++i) > - cout << ssprintf(" (%d) %s", i+1, archives_text(choices[i]).c_str()) << > endl; > + cout << ssprintf(" (%d) %s", (int)(i+1), > archives_text(choices[i]).c_str()) << endl; That one I fixed already. > - cerr << ssprintf(_("Invalid response. Please enter an integer between > 1 and %d."), choices.size()) << endl; > + cerr << ssprintf(_("Invalid response. Please enter an integer between > 1 and %d."), (int)choices.size()) << endl; This is fine since the choices list will always be less than the largest possible int ;-). > else > return choices[i]; > } > @@ -561,8 +561,8 @@ > resolver_manager::state state = resman->state_snapshot(); > > spin.set_msg(ssprintf(_("open: %d; closed: %d; defer: %d; conflict: > %d"), > - state.open_size, state.closed_size, > - state.deferred_size, state.conflicts_size)); > + (int)(state.open_size), > (int)(state.closed_size), > + (int)(state.deferred_size), > (int)(state.conflicts_size))); Again, the number of search nodes examined should be less than the largest possible int, so this is ok. OTOH, these guys are *actually* size_t values, so maybe I'll consider using %zd instead. > output_fragments.push_back(cw::text_fragment(ssprintf(ngettext("There > is %d newly obsolete package.", > "There > are %d newly obsolete packages.", > > new_obsolete.size()), > - > new_obsolete.size()))); > + > (int)new_obsolete.size()))); I expect that less than 1<<31 packages will be obsolete, so this will work. Thanks, Daniel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]