Fix two clang warnings

This commit is contained in:
Cheer Xiao 2013-01-15 17:52:03 +08:00
parent c6e5987480
commit 8600243683
2 changed files with 3 additions and 3 deletions

View file

@ -1248,7 +1248,7 @@ void exec(parser_t &parser, job_t *j)
std::string actual_cmd_str = wcs2string(p->actual_cmd); std::string actual_cmd_str = wcs2string(p->actual_cmd);
const char *actual_cmd = actual_cmd_str.c_str(); const char *actual_cmd = actual_cmd_str.c_str();
const wchar_t *reader_current_filename(); const wchar_t *reader_current_filename(void);
if (g_log_forks) if (g_log_forks)
{ {
const wchar_t *file = reader_current_filename(); const wchar_t *file = reader_current_filename();

View file

@ -753,14 +753,14 @@ static int expand_pid(const wcstring &instr_with_sep,
if (wcsncmp(in+1, SELF_STR, wcslen(in+1))==0) if (wcsncmp(in+1, SELF_STR, wcslen(in+1))==0)
{ {
append_completion(out, append_completion(out,
SELF_STR+wcslen(in+1), &SELF_STR[wcslen(in+1)],
COMPLETE_SELF_DESC, COMPLETE_SELF_DESC,
0); 0);
} }
else if (wcsncmp(in+1, LAST_STR, wcslen(in+1))==0) else if (wcsncmp(in+1, LAST_STR, wcslen(in+1))==0)
{ {
append_completion(out, append_completion(out,
LAST_STR+wcslen(in+1), &LAST_STR[wcslen(in+1)],
COMPLETE_LAST_DESC, COMPLETE_LAST_DESC,
0); 0);
} }