diff options
author | Will Song <incertia9474@gmail.com> | 2015-11-23 20:39:04 -0600 |
---|---|---|
committer | Will Song <incertia9474@gmail.com> | 2015-11-23 20:39:04 -0600 |
commit | ddd5ce857d58f1da36a53fc867a80dcbe094663a (patch) | |
tree | 73520b483faef0ed2ad5a9e9161fd27f8710b7fb | |
parent | 8b7781294719acc698cd3dd69d86473369bcce90 (diff) | |
download | profani-tty-ddd5ce857d58f1da36a53fc867a80dcbe094663a.tar.gz |
mark return value of sys_write as unused to fix tests
-rw-r--r-- | src/command/commands.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index ef2de3b1..2d76aeda 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -808,7 +808,8 @@ writecsv(int fd, const char *const str){ if(str[i] != '"') *c++ = str[i]; else { *c++ = '"'; *c++ = '"'; len++; } } - write(fd, s, len); + int unused = write(fd, s, len); + (void)(unused); free(s); } @@ -835,13 +836,15 @@ cmd_export(ProfWin *window, const char *const command, gchar **args) PContact contact = curr->data; const char *jid = p_contact_barejid(contact); const char *name = p_contact_name(contact); + int unused; + (void)(unused); /* write the data to the file */ - write(fd, "\"", 1); + unused = write(fd, "\"", 1); writecsv(fd, jid); - write(fd, "\",\"", 3); + unused = write(fd, "\",\"", 3); writecsv(fd, name); - write(fd, "\"\n", 2); + unused = write(fd, "\"\n", 2); /* loop */ curr = g_slist_next(curr); |