emotion/generic: Remove warnings.
authorantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 3 Oct 2011 18:39:20 +0000 (18:39 +0000)
committerantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 3 Oct 2011 18:39:20 +0000 (18:39 +0000)
Remove unused functions, variables and fix a "return" on a non-void
returning function.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/emotion@63780 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/generic/emotion_generic.c

index 6f497d4..364ff8c 100644 (file)
@@ -238,42 +238,6 @@ _player_ready(Emotion_Generic_Video *ev)
    _file_open(ev);
 }
 
-static int
-_em_read_safe(int fd, void *buf, ssize_t size)
-{
-   ssize_t todo;
-   char *p;
-
-   todo = size;
-   p = buf;
-
-   while (todo > 0)
-     {
-        ssize_t r;
-
-        r = read(fd, p, todo);
-        if (r > 0)
-          {
-             todo -= r;
-             p += r;
-          }
-        else if (r == 0)
-          return 0;
-        else
-          {
-             if (errno == EINTR || errno == EAGAIN)
-              return size - todo;
-             else
-               {
-                  ERR("could not read from fd %d: %s", fd, strerror(errno));
-                  return -1;
-               }
-          }
-     }
-
-   return size;
-}
-
 static Eina_Bool
 _player_cmd_param_read(Emotion_Generic_Video *ev, void *param, size_t size)
 {
@@ -321,38 +285,6 @@ _player_cmd_param_read(Emotion_Generic_Video *ev, void *param, size_t size)
    return EINA_FALSE;
 }
 
-static Eina_Bool
-_player_int_read(Emotion_Generic_Video *ev, int *i)
-{
-   int n;
-   n = _em_read_safe(ev->fd_read, i, sizeof(*i));
-   if (n <= 0)
-     {
-       ERR("could not read int from fd_read %d\n", ev->fd_read);
-       return EINA_FALSE;
-     }
-
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_player_str_read(Emotion_Generic_Video *ev, char *str, int *len)
-{
-   int n;
-
-   if (!_player_int_read(ev, len))
-     return EINA_FALSE;
-
-   n = _em_read_safe(ev->fd_read, str, *len);
-   if (n <= 0)
-     {
-       ERR("could not read string from fd_read %d\n", ev->fd_read);
-       return EINA_FALSE;
-     }
-
-   return EINA_TRUE;
-}
-
 static void
 _player_frame_resize(Emotion_Generic_Video *ev)
 {
@@ -498,15 +430,6 @@ _player_spu_tracks_info(Emotion_Generic_Video *ev)
 }
 
 static void
-_player_helper_str_read(Emotion_Generic_Video *ev, const char **pstr)
-{
-   int len;
-   char buf[PATH_MAX];
-   if (_player_str_read(ev, buf, &len))
-     *pstr = eina_stringshare_add_length(buf, len);
-}
-
-static void
 _player_meta_info_free(Emotion_Generic_Video *ev)
 {
    eina_stringshare_replace(&ev->meta.title, NULL);
@@ -708,7 +631,6 @@ static void
 _player_cmd_track_info(Emotion_Generic_Video *ev)
 {
    int param;
-   Eina_Bool r;
    int i;
 
    if (ev->cmd.num_params == 0)
@@ -1319,7 +1241,7 @@ em_bgra_data_get(void *data, unsigned char **bgra_data)
    Emotion_Generic_Video *ev = data;
 
    if (!ev || !ev->file_ready)
-     return;
+     return 0;
 
    // lock frame here
    sem_wait(&ev->shared->lock);