Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
src/pcscdaemon.c:578:10: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
                        ret = read(pipefd[0], &buf, 1);
                            ~ ^~~~~~~~~~~~~~~~~~~~~~~~
src/pcscdaemon.c:851:6: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
        r = write(signal_handler_fd[1], &sig, sizeof sig);
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
LudovicRousseau committed May 6, 2024
1 parent 70c11a6 commit 68186f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pcscdaemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void *signal_thread(void *arg)

while (true)
{
int r;
ssize_t r;
int sig;

r = read(signal_handler_fd[0], &sig, sizeof sig);
Expand Down Expand Up @@ -569,7 +569,7 @@ int main(int argc, char **argv)
/* in the father */
{
char buf;
int ret;
ssize_t ret;

/* close write side */
close(pipefd[1]);
Expand Down Expand Up @@ -846,7 +846,7 @@ static void clean_temp_files(void)

static void signal_trap(int sig)
{
int r;
ssize_t r;

r = write(signal_handler_fd[1], &sig, sizeof sig);
if (r < 0)
Expand Down

0 comments on commit 68186f1

Please sign in to comment.