From 644b4f3aac650157734c66c2f4458fe963c13cb7 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Tue, 22 Dec 2020 16:09:19 +0000
Subject: [PATCH] (filegui.c) Fix -Wcast-qual warning
filegui.c:531:19: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
s1 = (char *) file_date (ui->src_stat->st_mtime);
^
filegui.c:546:19: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
s1 = (char *) file_date (ui->dst_stat->st_mtime);
^
Found by Clang-11
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/filemanager/filegui.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c
index 313bb407d..de590aede 100644
a
|
b
|
overwrite_query_dialog (file_op_context_t * ctx, enum OperationMode mode) |
492 | 492 | |
493 | 493 | vfs_path_t *p; |
494 | 494 | char *s1; |
| 495 | const char *cs1; |
495 | 496 | char s2[BUF_SMALL]; |
496 | 497 | int w, bw1, bw2; |
497 | 498 | unsigned short i; |
… |
… |
overwrite_query_dialog (file_op_context_t * ctx, enum OperationMode mode) |
528 | 529 | size_trunc_len (s2, sizeof (s2), ui->src_stat->st_size, 0, panels_options.kilobyte_si); |
529 | 530 | NEW_LABEL (2, s2); |
530 | 531 | /* new file modification date & time */ |
531 | | s1 = (char *) file_date (ui->src_stat->st_mtime); |
532 | | NEW_LABEL (3, s1); |
| 532 | cs1 = file_date (ui->src_stat->st_mtime); |
| 533 | NEW_LABEL (3, cs1); |
533 | 534 | |
534 | 535 | /* existing file */ |
535 | 536 | NEW_LABEL (4, dlg_widgets[4].text); |
… |
… |
overwrite_query_dialog (file_op_context_t * ctx, enum OperationMode mode) |
543 | 544 | size_trunc_len (s2, sizeof (s2), ui->dst_stat->st_size, 0, panels_options.kilobyte_si); |
544 | 545 | NEW_LABEL (6, s2); |
545 | 546 | /* existing file modification date & time */ |
546 | | s1 = (char *) file_date (ui->dst_stat->st_mtime); |
547 | | NEW_LABEL (7, s1); |
| 547 | cs1 = file_date (ui->dst_stat->st_mtime); |
| 548 | NEW_LABEL (7, cs1); |
548 | 549 | |
549 | 550 | /* will "Append" and "Reget" buttons be in the dialog? */ |
550 | 551 | do_append = !S_ISDIR (ui->dst_stat->st_mode); |