mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
fish.c: avoid "assignment discards qualifiers..." warning
* fish/fish.c (main): Cast-away-const. * fish/fish.h (bad_cast): Define. Safer than using an actual cast.
This commit is contained in:
@@ -267,7 +267,7 @@ main (int argc, char *argv[])
|
||||
*p = '\0';
|
||||
mp->mountpoint = p+1;
|
||||
} else
|
||||
mp->mountpoint = "/";
|
||||
mp->mountpoint = bad_cast ("/");
|
||||
mp->device = optarg;
|
||||
mp->next = mps;
|
||||
mps = mp;
|
||||
|
||||
@@ -106,4 +106,10 @@ extern char *try_tilde_expansion (char *path);
|
||||
"reopen", \
|
||||
"time"
|
||||
|
||||
static inline char *
|
||||
bad_cast (char const *s)
|
||||
{
|
||||
return (char *) s;
|
||||
}
|
||||
|
||||
#endif /* FISH_H */
|
||||
|
||||
Reference in New Issue
Block a user