mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-06 22:29:23 +00:00
* Casting printf input to match the format type.
* Properly clear the queued events during closing of a socket by checking for the file descriptor, not the ptr. * SCGI m_task queue could overflow since the check was not working. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1246 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -95,7 +95,7 @@ public:
|
||||
|
||||
void set_attr(unsigned int x, unsigned int y, unsigned int n, int attr, int color) { mvwchgat(m_window, y, x, n, attr, color, NULL); }
|
||||
|
||||
void set_default_attributes(int attr) { wattrset(m_window, attr); }
|
||||
void set_default_attributes(int attr) { (void)wattrset(m_window, attr); }
|
||||
|
||||
// Initialize stdscr.
|
||||
static void initialize();
|
||||
|
||||
@@ -122,7 +122,7 @@ TextElementCommand::print(char* first, char* last, Canvas::attributes_list* attr
|
||||
}
|
||||
case torrent::Object::TYPE_VALUE:
|
||||
{
|
||||
first += std::min<ptrdiff_t>(std::max(snprintf(first, last - first + 1, "%lld", result.as_value()), 0), last - first + 1);
|
||||
first += std::min<ptrdiff_t>(std::max(snprintf(first, last - first + 1, "%lld", (long long int)result.as_value()), 0), last - first + 1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -124,7 +124,7 @@ TextElementValueBase::print(char* first, char* last, Canvas::attributes_list* at
|
||||
first += std::min<ptrdiff_t>(std::max(snprintf(first, last - first + 1, "%2d:%02d:%02d", u->tm_hour, u->tm_min, u->tm_sec), 0), last - first + 1);
|
||||
|
||||
} else {
|
||||
first += std::min<ptrdiff_t>(std::max(snprintf(first, last - first + 1, "%lld", val), 0), last - first + 1);
|
||||
first += std::min<ptrdiff_t>(std::max(snprintf(first, last - first + 1, "%lld", (long long int)val), 0), last - first + 1);
|
||||
}
|
||||
|
||||
push_attribute(attributes, Attributes(first, baseAttribute));
|
||||
|
||||
Reference in New Issue
Block a user