[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] sdiff: Match execvp argument types
From: |
Khem Raj |
Subject: |
[PATCH 1/2] sdiff: Match execvp argument types |
Date: |
Wed, 29 May 2024 21:30:38 -0700 |
Fixes build with GCC-14
../../diffutils-3.10/src/sdiff.c:579:28: error: passing argument 2 of '_execvp'
from incompatible pointer type [-Wincompatible-pointer-types]
579 | execvp (diffargv[0], (char **) diffargv);
| ^~~~~~~~~~~~~~~~~~
| |
| char **
* src/sdiff.c (main): execpv expects const pointer.
---
src/sdiff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdiff.c b/src/sdiff.c
index 0b638d4..a4642b1 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -576,7 +576,7 @@ main (int argc, char *argv[])
diffarg (argv[optind]);
diffarg (argv[optind + 1]);
diffarg (0);
- execvp (diffargv[0], (char **) diffargv);
+ execvp (diffargv[0], diffargv);
perror_fatal (diffargv[0]);
}
else
--
2.45.1
- [PATCH 1/2] sdiff: Match execvp argument types,
Khem Raj <=