mark return value of sys_write as unused to fix tests

This commit is contained in:
Will Song
2015-11-23 20:39:04 -06:00
parent 8b77812947
commit ddd5ce857d

View File

@@ -808,7 +808,8 @@ writecsv(int fd, const char *const str){
if(str[i] != '"') *c++ = str[i]; if(str[i] != '"') *c++ = str[i];
else { *c++ = '"'; *c++ = '"'; len++; } else { *c++ = '"'; *c++ = '"'; len++; }
} }
write(fd, s, len); int unused = write(fd, s, len);
(void)(unused);
free(s); free(s);
} }
@@ -835,13 +836,15 @@ cmd_export(ProfWin *window, const char *const command, gchar **args)
PContact contact = curr->data; PContact contact = curr->data;
const char *jid = p_contact_barejid(contact); const char *jid = p_contact_barejid(contact);
const char *name = p_contact_name(contact); const char *name = p_contact_name(contact);
int unused;
(void)(unused);
/* write the data to the file */ /* write the data to the file */
write(fd, "\"", 1); unused = write(fd, "\"", 1);
writecsv(fd, jid); writecsv(fd, jid);
write(fd, "\",\"", 3); unused = write(fd, "\",\"", 3);
writecsv(fd, name); writecsv(fd, name);
write(fd, "\"\n", 2); unused = write(fd, "\"\n", 2);
/* loop */ /* loop */
curr = g_slist_next(curr); curr = g_slist_next(curr);