bot warnings begone, hopefully
authorsachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 14 May 2012 15:05:04 +0000 (15:05 +0000)
committersachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 14 May 2012 15:05:04 +0000 (15:05 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@71076 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/evas_cserve2_cache.c
src/bin/evas_cserve2_main_loop_linux.c

index 3cd4547..fe41888 100644 (file)
@@ -853,8 +853,8 @@ _file_changed_cb(const char *path __UNUSED__, Eina_Bool deleted __UNUSED__, void
 int
 cserve2_cache_file_open(Client *client, unsigned int client_file_id, const char *path, const char *key, unsigned int rid)
 {
-   uintptr_t file_id;
-   Entry *entry;
+   unsigned int file_id;
+   File_Data *entry;
    Reference *ref;
    File_Watch *fw;
    char buf[4906];
@@ -884,10 +884,10 @@ cserve2_cache_file_open(Client *client, unsigned int client_file_id, const char
 
    // search whether the file is already opened by another client
    snprintf(buf, sizeof(buf), "%s:%s", path, key);
-   file_id = (uintptr_t)eina_hash_find(file_ids, buf);
+   file_id = (unsigned int)eina_hash_find(file_ids, buf);
    if (file_id)
      {
-        DBG("found file_id %d for client file id %d",
+        DBG("found file_id %u for client file id %d",
                 file_id, client_file_id);
         entry = eina_hash_find(file_entries, &file_id);
         if (!entry)
@@ -910,7 +910,7 @@ cserve2_cache_file_open(Client *client, unsigned int client_file_id, const char
    while ((file_id == 0) || (eina_hash_find(file_entries, &file_id)))
      file_id = _file_id++;
 
-   DBG("Creating new entry with file_id: %d for file \"%s:%s\"",
+   DBG("Creating new entry with file_id: %u for file \"%s:%s\"",
        file_id, path, key);
    entry = calloc(1, sizeof(*entry));
    entry->type = CSERVE2_IMAGE_FILE;
@@ -1247,7 +1247,7 @@ cserve2_cache_request_failed(void *data, Error_Type type)
 
    EINA_LIST_FOREACH(entry->references, l, ref)
      {
-        Eina_Hash *hash;
+        Eina_Hash *hash = NULL;
         if (entry->type == CSERVE2_IMAGE_FILE)
           hash = ref->client->files.referencing;
         else if (entry->type == CSERVE2_IMAGE_DATA)
index b092cc2..ad28518 100644 (file)
@@ -355,7 +355,7 @@ Eina_Bool
 cserve2_main_loop_setup(void)
 {
    int sfd;
-   int socket;
+   int sock;
    int ifd;
 
    epoll_fd = epoll_create1(EPOLL_CLOEXEC);
@@ -393,18 +393,18 @@ cserve2_main_loop_setup(void)
         return EINA_FALSE;
      }
 
-   socket = _socketfd_setup();
-   if (socket == -1)
+   sock = _socketfd_setup();
+   if (sock == -1)
      {
         ERR("Could not setup socketfd.");
         goto error_socket;
      }
 
-   DBG("Add watch for socket fd: %d", socket);
-   if (!cserve2_fd_watch_add(socket, FD_READ, _socketfd_handler, NULL))
+   DBG("Add watch for socket fd: %d", sock);
+   if (!cserve2_fd_watch_add(sock, FD_READ, _socketfd_handler, NULL))
      {
         ERR("Could not add watch for socketf.");
-        close(socket);
+        close(sock);
         goto error_socket;
      }