summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShivakumar Halagatti <Shivakumar.Halagatti@in.bosch.com>2020-12-21 11:57:13 +0530
committerShivakumar Halagatti <Shivakumar.Halagatti@in.bosch.com>2020-12-21 12:45:58 +0530
commitc632404414c2d7d0186c213c4ac1d213a8a2fe0d (patch)
tree663adefaeb93d669dc61f1c7c20f6e33882545de
parent0cf7ed2885a508b230800f3c2c743f3997a5c8a7 (diff)
downloadwayland-ivi-extension-c632404414c2d7d0186c213c4ac1d213a8a2fe0d.tar.gz
simple-weston-client : Fix compiler warnings
Solve "ignoring return value" of read and pipe functions and remove unused variables temp and offset. Signed-off-by: Shivakumar Halagatti <Shivakumar.Halagatti@in.bosch.com>
-rw-r--r--ivi-layermanagement-examples/simple-weston-client/src/simple-weston-client.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ivi-layermanagement-examples/simple-weston-client/src/simple-weston-client.c b/ivi-layermanagement-examples/simple-weston-client/src/simple-weston-client.c
index bf67075..6b77f01 100644
--- a/ivi-layermanagement-examples/simple-weston-client/src/simple-weston-client.c
+++ b/ivi-layermanagement-examples/simple-weston-client/src/simple-weston-client.c
@@ -702,7 +702,6 @@ weston_dlt_thread_function(void *data)
WaylandContextStruct* wlcontext;
char apid[DLT_ID_SIZE];
char ctid[DLT_ID_SIZE];
- char *temp;
DLT_DECLARE_CONTEXT(weston_dlt_context)
wlcontext = (WaylandContextStruct*)data;
@@ -725,7 +724,8 @@ weston_dlt_thread_function(void *data)
/* read from std-in(read end of pipe) till newline char*/
do {
i++;
- read(wlcontext->pipefd[0], &str[i], 1);
+ if(read(wlcontext->pipefd[0], &str[i], 1) < 0)
+ printf("read failed : %s", strerror(errno));
} while (str[i] != '\n');
if (strcmp(str,"")!=0)
@@ -812,7 +812,6 @@ int main (int argc, const char * argv[])
BkGndSettingsStruct* bkgnd_settings;
struct sigaction sigint;
- int offset = 0;
int ret = 0;
sigint.sa_handler = signal_int;
@@ -858,7 +857,9 @@ int main (int argc, const char * argv[])
* stdin - read end
* weston will write to stdout and the
* dlt_ctx_thread will read from stdin */
- pipe(wlcontext->pipefd);
+ if((pipe(wlcontext->pipefd)) < 0)
+ printf("Error in pipe() processing : %s", strerror(errno));
+
dup2(wlcontext->pipefd[1], STDOUT_FILENO);
wlcontext->thread_running = 1;