* [LTP] [PATCH] [COMMITTED] lib/tst_test: Fix 'discards const' warning
@ 2021-08-05 13:32 Cyril Hrubis
0 siblings, 0 replies; only message in thread
From: Cyril Hrubis @ 2021-08-05 13:32 UTC (permalink / raw)
To: ltp
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
lib/tst_test.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 8a6a112ef..1bdea769a 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -882,7 +882,7 @@ static void prepare_and_mount_dev_fs(const char *mntpoint)
}
}
-static char *limit_tmpfs_mount_size(const char *mnt_data,
+static const char *limit_tmpfs_mount_size(const char *mnt_data,
char *buf, size_t buf_size, const char *fs_type)
{
if (strcmp(fs_type, "tmpfs"))
@@ -908,7 +908,8 @@ static const char *get_device_name(const char *fs_type)
static void prepare_device(void)
{
- char *mnt_data, buf[1024];
+ const char *mnt_data;
+ char buf[1024];
if (tst_test->format_device) {
SAFE_MKFS(tdev.dev, tdev.fs_type, tst_test->dev_fs_opts,
--
2.31.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-05 13:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 13:32 [LTP] [PATCH] [COMMITTED] lib/tst_test: Fix 'discards const' warning Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.