commit 923f9ce5257203206ad6ed12b05f7d1576eb1ab0 from: Omar Polo date: Mon Jun 21 12:45:12 2021 UTC work around some GCC warnings clang doesn't emit any. To be honest, some of them are actually right (like the missing `void'), others are impossible but still it's not a bad idea to initialize some variable. Future me maybe will be thankful. commit - 3323faaf68d2b9a935856c12b10d27df7be97bdb commit + 923f9ce5257203206ad6ed12b05f7d1576eb1ab0 blob - 6f0e9100a45040417c8bf581b6a19797b1f4af41 blob + d0a37bd5a5cfc08f94752fec9eee724684788010 --- ui.c +++ ui.c @@ -129,7 +129,7 @@ int in_minibuffer; struct ministate ministate; static inline void -update_x_offset() +update_x_offset(void) { if (olivetti_mode && fill_column < body_cols) x_offset = (body_cols - fill_column)/2; @@ -780,6 +780,11 @@ redraw_tabline(void) const char *title; char buf[25]; + x = 0; + + /* unused, but setted by a getyx */ + (void)y; + tabwidth = sizeof(buf)+1; space = COLS-2; @@ -923,6 +928,7 @@ trust_status_char(enum trust_state ts) case TS_UNTRUSTED: return '!'; case TS_TRUSTED: return 'v'; case TS_VERIFIED: return 'V'; + default: return 'X'; } } @@ -976,7 +982,10 @@ redraw_minibuffer(void) { struct tab *tab; size_t off_y, off_x = 0; - char *start, *c; + char *start = NULL, *c = NULL; + + /* unused, but set by getyx */ + (void)off_y; wattron(minibuf, minibuffer_face.background); werase(minibuf);