Changeset 14165


Ignore:
Timestamp:
Aug 17, 2013, 4:31:03 PM (8 years ago)
Author:
jordan
Message:

silence a small handful of minor gcc compiler warnings in libtransmission

Location:
trunk/libtransmission
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rename-test.c

    r14077 r14165  
    9494  dir = tr_dirname (path);
    9595  errno = 0;
    96   rv = tr_mkdirp (dir, 0700);
     96  tr_mkdirp (dir, 0700);
    9797  assert (errno == 0);
    98   assert (rv == 0);
    9998  tr_free (dir);
    10099
  • trunk/libtransmission/rpcimpl.c

    r14130 r14165  
    15881588      result = NULL;
    15891589    }
    1590   else if (err == TR_PARSE_ERR)
    1591     {
    1592       key = 0;
    1593       result = "invalid or corrupt torrent file";
    1594     }
    15951590  else if (err == TR_PARSE_DUPLICATE)
    15961591    {
     
    15981593      key = TR_KEY_torrent_duplicate;
    15991594      result = "duplicate torrent";
     1595    }
     1596  else /* err == TR_PARSE_ERR */
     1597    {
     1598      key = 0;
     1599      result = "invalid or corrupt torrent file";
    16001600    }
    16011601
  • trunk/libtransmission/trevent.c

    r13868 r14165  
    306306                     void func (void*), void * user_data)
    307307{
    308     assert (tr_isSession (session));
    309     assert (session->events != NULL);
    310 
    311     if (tr_amInThread (session->events->thread))
     308  assert (tr_isSession (session));
     309  assert (session->events != NULL);
     310
     311  if (tr_amInThread (session->events->thread))
    312312    {
    313313      (func)(user_data);
    314314    }
    315     else
    316     {
    317         const char         ch = 'r';
    318         int                fd = session->events->fds[1];
    319         tr_lock *          lock = session->events->lock;
    320         struct tr_run_data data;
    321 
    322         tr_lockLock (lock);
    323         pipewrite (fd, &ch, 1);
    324         data.func = func;
    325         data.user_data = user_data;
    326         pipewrite (fd, &data, sizeof (data));
    327         tr_lockUnlock (lock);
    328     }
    329 }
     315  else
     316    {
     317      int fd;
     318      char ch;
     319      ssize_t res_1;
     320      ssize_t res_2;
     321      tr_event_handle * e = session->events;
     322      struct tr_run_data data;
     323
     324      tr_lockLock (e->lock);
     325
     326      fd = e->fds[1];
     327      ch = 'r';
     328      res_1 = pipewrite (fd, &ch, 1);
     329
     330      data.func = func;
     331      data.user_data = user_data;
     332      res_2 = pipewrite (fd, &data, sizeof (data));
     333
     334      tr_lockUnlock (e->lock);
     335
     336      if ((res_1 == -1) || (res_2 == -1))
     337        tr_logAddError ("Unable to write to libtransmisison event queue: %s", tr_strerror(errno));
     338    }
     339}
  • trunk/libtransmission/variant.c

    r13970 r14165  
    12841284        break;
    12851285
    1286       case TR_VARIANT_FMT_BENC:
     1286      default /* TR_VARIANT_FMT_BENC */:
    12871287        err = tr_variantParseBenc (buf, ((const char*)buf)+buflen, setme, setme_end);
    12881288        break;
Note: See TracChangeset for help on using the changeset viewer.