drm - shut up warnings (not actual bugs)

This commit is contained in:
Carsten Haitzler 2014-03-22 19:09:01 +09:00
parent 4de2059d41
commit 4da1081c4d
3 changed files with 21 additions and 15 deletions

View File

@ -213,6 +213,7 @@ _send_msg(int opcode, int fd, void *data, size_t bytes)
struct iovec iov[2];
struct msghdr msg;
ssize_t size;
int *iptr;
/* send a message to the calling process */
/* 'fd' is the fd to send */
@ -242,7 +243,8 @@ _send_msg(int opcode, int fd, void *data, size_t bytes)
msg.msg_controllen = RIGHTS_LEN;
fprintf(stderr, "Launcher Sending FD: %d\n", fd);
*((int *)CMSG_DATA(cmsgptr)) = fd;
iptr = (int *)(CMSG_DATA(cmsgptr));
*iptr = fd;
errno = 0;
size = sendmsg(_write_fd, &msg, MSG_EOR);
@ -267,6 +269,7 @@ _recv_msg(void)
struct cmsghdr *cmsg = NULL;
char data[BUFSIZ];
ssize_t size;
int *iptr;
fprintf(stderr, "Received Message\n");
@ -307,7 +310,8 @@ _recv_msg(void)
switch (cmsg->cmsg_type)
{
case SCM_RIGHTS:
fd = *((int *)CMSG_DATA(cmsg));
iptr = (int *)(CMSG_DATA(cmsg));
fd = *iptr;
switch (dmsg.opcode)
{
case ECORE_DRM_OP_DEVICE_OPEN:

View File

@ -116,6 +116,7 @@ _ecore_drm_socket_send(int opcode, int fd, void *data, size_t bytes)
struct iovec iov[2];
struct msghdr msg;
ssize_t size;
int *iptr;
/* Simplified version of sending messages. We don't need to send any
* 'credentials' with this as it is just basically an IPC to send over
@ -147,10 +148,9 @@ _ecore_drm_socket_send(int opcode, int fd, void *data, size_t bytes)
msg.msg_control = cmsgptr;
msg.msg_controllen = RIGHTS_LEN;
if (fd > -1)
*((int *)CMSG_DATA(cmsgptr)) = fd;
else
*((int *)CMSG_DATA(cmsgptr)) = _ecore_drm_sockets[1];
iptr = (int *)(CMSG_DATA(cmsgptr));
if (fd > -1) *iptr = fd;
else *iptr = _ecore_drm_sockets[1];
errno = 0;
size = sendmsg(_ecore_drm_sockets[1], &msg, MSG_EOR);
@ -173,6 +173,7 @@ _ecore_drm_socket_receive(int opcode EINA_UNUSED, int *fd, void **data, size_t b
struct iovec iov[2];
struct msghdr msg;
char buff[CMSG_SPACE(sizeof(fd))];
int *iptr;
/* ssize_t size; */
memset(&dmsg, 0, sizeof(dmsg));
@ -212,7 +213,8 @@ _ecore_drm_socket_receive(int opcode EINA_UNUSED, int *fd, void **data, size_t b
switch (cmsg->cmsg_type)
{
case SCM_RIGHTS:
if (fd) *fd = *((int *)CMSG_DATA(cmsg));
iptr = (int *)(CMSG_DATA(cmsg));
if (fd) *fd = *iptr;
switch (dmsg.opcode)
{
case ECORE_DRM_OP_DEVICE_OPEN:

View File

@ -140,7 +140,7 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
};
EAPI Ecore_Evas *
ecore_evas_drm_new_internal(const char *device, unsigned int parent, int x, int y, int w, int h)
ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED, int x, int y, int w, int h)
{
Ecore_Evas *ee;
Evas_Engine_Info_Drm *einfo;
@ -737,13 +737,13 @@ _ecore_evas_drm_render_updates_process(Ecore_Evas *ee, Eina_List *updates)
if ((ee->visible) && (updates))
{
Eina_List *l = NULL;
Eina_Rectangle *r;
EINA_LIST_FOREACH(updates, l, r)
{
/* TODO */
}
// Eina_List *l = NULL;
// Eina_Rectangle *r;
//
// EINA_LIST_FOREACH(updates, l, r)
// {
// /* TODO */
// }
_ecore_evas_idle_timeout_update(ee);
rend = 1;