summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 8ebd1de116..14317a4ba2 100644
--- a/dir.c
+++ b/dir.c
@@ -352,8 +352,8 @@ static VALUE dir_close(VALUE);
#define GlobPathValue(str, safe) \
/* can contain null bytes as separators */ \
(!RB_TYPE_P(str, T_STRING) ? \
- FilePathValue(str) : \
- (check_safe_glob(str, safe), \
+ (void)FilePathValue(str) : \
+ (void)(check_safe_glob(str, safe), \
check_glob_encoding(str), (str)))
#define check_safe_glob(str, safe) ((safe) ? rb_check_safe_obj(str) : (void)0)
#define check_glob_encoding(str) rb_enc_check((str), rb_enc_from_encoding(rb_usascii_encoding()))