Skip to content

Commit

Permalink
Fix compile warnings for an unused variable and return values
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas committed Apr 25, 2012
1 parent 3525ca9 commit e108e28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 7 additions & 3 deletions io.c
Expand Up @@ -276,10 +276,14 @@ open_trace(int devnull, const char *argv[])
int i;

for (i = 0; argv[i]; i++) {
write(fd, argv[i], strlen(argv[i]));
write(fd, " ", 1);
if (write(fd, argv[i], strlen(argv[i])) == -1
|| write(fd, " ", 1) == -1)
break;
}
if (argv[i] || write(fd, "\n", 1) == -1) {
close(fd);
return devnull;
}
write(fd, "\n", 1);

return fd;
}
Expand Down
2 changes: 0 additions & 2 deletions tig.c
Expand Up @@ -644,8 +644,6 @@ get_line_type_from_ref(const struct ref *ref)
static inline struct line_info *
get_line(enum line_type type)
{
struct line_info *info;

if (type > LINE_NONE) {
assert(TO_CUSTOM_COLOR_OFFSET(type) < custom_colors);
return &custom_color[TO_CUSTOM_COLOR_OFFSET(type)];
Expand Down

0 comments on commit e108e28

Please sign in to comment.