diff --git a/builtin.c b/builtin.c index 0aff1d7e3..2dbb3be2a 100644 --- a/builtin.c +++ b/builtin.c @@ -2526,9 +2526,9 @@ static int builtin_source( wchar_t ** argv ) if( res ) { sb_printf( sb_err, - _( L"%ls: Error while reading file '%ls'\n" ), - argv[0], - argv[1]?argv[1]:L"" ); + _( L"%ls: Error while reading file '%ls'\n" ), + argv[0], + argv[1] ); } /* diff --git a/env_universal_common.c b/env_universal_common.c index 4a9e3abb0..988dbfbd2 100644 --- a/env_universal_common.c +++ b/env_universal_common.c @@ -93,7 +93,7 @@ typedef struct var_uni_entry { int export; /**< Whether the variable should be exported */ - wchar_t val[0]; /**< The value of the variable */ + wchar_t val[1]; /**< The value of the variable */ } var_uni_entry_t; @@ -113,7 +113,6 @@ void (*callback)( int type, const wchar_t *key, const wchar_t *val ); - /** Variable used by env_get_names to communicate auxiliary information to add_key_to_hash diff --git a/env_universal_common.h b/env_universal_common.h index 166fb6b7c..97edd7119 100644 --- a/env_universal_common.h +++ b/env_universal_common.h @@ -112,7 +112,7 @@ typedef struct /** Message body. The message must be allocated using enough memory to actually contain the message. */ - char body[0]; + char body[1]; } message_t; diff --git a/reader.c b/reader.c index 4973dda93..0c6d56064 100644 --- a/reader.c +++ b/reader.c @@ -115,7 +115,7 @@ commence. fish specific commands, meaning it will work even if fish is not installed. This is used by read_i. */ -#define DEFAULT_PROMPT L"whoami; echo @; hostname|cut -d . -f 1; echo \" \"; pwd; printf '> ';" +#define DEFAULT_PROMPT L"echo \"$USER@\"; hostname|cut -d . -f 1; echo \" \"; pwd; printf '> ';" #define PROMPT_FUNCTION_NAME L"fish_prompt"