mirror of
https://github.com/transmission/transmission
synced 2025-02-22 14:10:34 +00:00
silence a small handful of minor gcc compiler warnings in libtransmission
This commit is contained in:
parent
ba688e2811
commit
765879ddba
3 changed files with 8 additions and 5 deletions
|
@ -343,7 +343,7 @@ libttest_zero_torrent_populate (tr_torrent * tor, bool complete)
|
|||
|
||||
for (i=0; i<tor->info.fileCount; ++i)
|
||||
{
|
||||
int rv;
|
||||
int err;
|
||||
uint64_t j;
|
||||
FILE * fp;
|
||||
char * path;
|
||||
|
@ -367,8 +367,11 @@ libttest_zero_torrent_populate (tr_torrent * tor, bool complete)
|
|||
|
||||
path = tr_torrentFindFile (tor, i);
|
||||
assert (path != NULL);
|
||||
rv = stat (path, &sb);
|
||||
assert (rv == 0);
|
||||
err = errno;
|
||||
errno = 0;
|
||||
stat (path, &sb);
|
||||
assert (errno == 0);
|
||||
errno = err;
|
||||
tr_free (path);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@ torrentRenameAndWait (tr_torrent * tor,
|
|||
static void
|
||||
create_file_with_contents (const char * path, const char * str)
|
||||
{
|
||||
int rv;
|
||||
FILE * fp;
|
||||
char * dir;
|
||||
const int tmperr = errno;
|
||||
|
|
|
@ -265,7 +265,8 @@ tr_eventInit (tr_session * session)
|
|||
|
||||
eh = tr_new0 (tr_event_handle, 1);
|
||||
eh->lock = tr_lockNew ();
|
||||
pipe (eh->fds);
|
||||
if (pipe (eh->fds) == -1)
|
||||
tr_logAddError ("Unable to write to pipe() in libtransmission: %s", tr_strerror(errno));
|
||||
eh->session = session;
|
||||
eh->thread = tr_threadNew (libeventThreadFunc, eh);
|
||||
|
||||
|
|
Loading…
Reference in a new issue