Skip to content

Commit

Permalink
Fix three small warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Dec 6, 2008
1 parent 7ce4003 commit 49a8434
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
9 changes: 6 additions & 3 deletions functions.c
Expand Up @@ -1953,7 +1953,7 @@ void owl_function_delete_automsgs()

void owl_function_status()
{
char buff[5000];
char buff[MAXPATHLEN+1];
time_t start;
int up, days, hours, minutes;
owl_fmtext fm;
Expand All @@ -1973,8 +1973,11 @@ void owl_function_status()
owl_fmtext_append_normal(&fm, "\n");

owl_fmtext_append_normal(&fm, " Current Directory: ");
(void) getcwd(buff, MAXPATHLEN);
owl_fmtext_append_normal(&fm, buff);
if(getcwd(buff, MAXPATHLEN) == NULL) {
owl_fmtext_append_normal(&fm, "<Error in getcwd>");
} else {
owl_fmtext_append_normal(&fm, buff);
}
owl_fmtext_append_normal(&fm, "\n");

sprintf(buff, " Startup Time: %s", ctime(&start));
Expand Down
5 changes: 0 additions & 5 deletions popexec.c
Expand Up @@ -72,11 +72,6 @@ owl_popexec *owl_popexec_new(char *command)
dup2(child_write_fd, 1 /*stdout*/);
dup2(child_write_fd, 2 /*stderr*/);
close(child_write_fd);

while(0) {
write(child_write_fd, "meep\n", 5);
sleep(1);
}

argv[0] = "sh";
argv[1] = "-c";
Expand Down
2 changes: 1 addition & 1 deletion wcwidth.c
Expand Up @@ -61,7 +61,7 @@

#include <wchar.h>

static struct interval {
struct interval { /* noproto */
int first;
int last;
};
Expand Down

0 comments on commit 49a8434

Please sign in to comment.