summaryrefslogtreecommitdiffstats
path: root/browser.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-07-13 13:15:38 -0700
committerKevin McCarthy <kevin@8t8.us>2021-07-17 15:14:59 -0700
commit658e8e94d3c5e0f6e3a90096b2b7d6f94f022d81 (patch)
treed28d4109274be5ea9b45dfbf2c9bb3f6ca3659b8 /browser.c
parent6ecdb0917b6440f7eb115cc5ae598f23f17c7263 (diff)
Silence compiler warning in _mutt_buffer_select_file().
Using a constant offset apparently allows the compiler to be smart enough to detect a potential problem, but it isn't smart enough to see we've already determined lastdirlen is non-zero.
Diffstat (limited to 'browser.c')
-rw-r--r--browser.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/browser.c b/browser.c
index 060eee36..034f1ef6 100644
--- a/browser.c
+++ b/browser.c
@@ -998,7 +998,10 @@ void _mutt_buffer_select_file (BUFFER *f, int flags, char ***files, int *numfile
{
char *p = NULL;
if (lastdirlen > 1)
- p = strrchr (mutt_b2s (LastDir) + 1, '/');
+ {
+ /* "mutt_b2s (LastDir) + 1" triggers a compiler warning */
+ p = strrchr (LastDir->data + 1, '/');
+ }
if (p)
{