Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/md5.c
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2017-03-20 14:42:01 +0300
committerFelix Fietkau <nbd@nbd.name>2017-03-20 14:44:46 +0300
commit723730214732862de7e892bae2f7a7889e66bf1b (patch)
tree856bb0cd5c0104aec289491232e0ca522b786f20 /md5.c
parent96305a3cafcc9c0df7f189567671bb26ce3eb129 (diff)
md5: add "const" qualifier to the "file" argument
This is intended to fix the following compiler warning in opkg-lede: /home/yousong/git-repo/lede-project/opkg-lede/libopkg/file_util.c: In function ‘file_md5sum_alloc’: /home/yousong/git-repo/lede-project/opkg-lede/libopkg/file_util.c:144:2: warning: passing argument 1 of ‘md5sum’ discards ‘const’ qualifier from pointer target type [enabled by default] In file included from /home/yousong/git-repo/lede-project/opkg-lede/libopkg/file_util.c:28:0: /home/yousong/.usr/include/libubox/md5.h:56:5: note: expected ‘char *’ but argument is of type ‘const char *’ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'md5.c')
-rw-r--r--md5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/md5.c b/md5.c
index 781dbd1..3f8ad28 100644
--- a/md5.c
+++ b/md5.c
@@ -308,7 +308,7 @@ void md5_end(void *resbuf, md5_ctx_t *ctx)
memset(ctx, 0, sizeof(*ctx));
}
-int md5sum(char *file, void *md5_buf)
+int md5sum(const char *file, void *md5_buf)
{
char buf[256];
md5_ctx_t ctx;