From 86002436837003a0b3655d5c41e51ca12b746bc1 Mon Sep 17 00:00:00 2001 From: Cheer Xiao Date: Tue, 15 Jan 2013 17:52:03 +0800 Subject: [PATCH] Fix two clang warnings --- exec.cpp | 2 +- expand.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exec.cpp b/exec.cpp index e72a787f5..1eb91cc81 100644 --- a/exec.cpp +++ b/exec.cpp @@ -1248,7 +1248,7 @@ void exec(parser_t &parser, job_t *j) std::string actual_cmd_str = wcs2string(p->actual_cmd); 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) { const wchar_t *file = reader_current_filename(); diff --git a/expand.cpp b/expand.cpp index 860c6dec6..c2095f37e 100644 --- a/expand.cpp +++ b/expand.cpp @@ -753,14 +753,14 @@ static int expand_pid(const wcstring &instr_with_sep, if (wcsncmp(in+1, SELF_STR, wcslen(in+1))==0) { append_completion(out, - SELF_STR+wcslen(in+1), + &SELF_STR[wcslen(in+1)], COMPLETE_SELF_DESC, 0); } else if (wcsncmp(in+1, LAST_STR, wcslen(in+1))==0) { append_completion(out, - LAST_STR+wcslen(in+1), + &LAST_STR[wcslen(in+1)], COMPLETE_LAST_DESC, 0); }