diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-21 14:55:39 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-08-21 15:24:25 +0200 |
commit | 7b2d9feb821376603bcbc0707e21edce36109f9a (patch) | |
tree | 88d9567cacdbf83fa07fbfabe6f3521c5df5492c | |
parent | 05fd2a60466cb7c270b60e9b93c46548acf319cd (diff) | |
download | libguestfs-7b2d9feb821376603bcbc0707e21edce36109f9a.tar.gz libguestfs-7b2d9feb821376603bcbc0707e21edce36109f9a.tar.xz libguestfs-7b2d9feb821376603bcbc0707e21edce36109f9a.zip |
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.
-rw-r--r-- | fish/fish.c | 2 | ||||
-rw-r--r-- | fish/fish.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/fish/fish.c b/fish/fish.c index 987df596..9de8e070 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -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; diff --git a/fish/fish.h b/fish/fish.h index b7ed922d..642c269a 100644 --- a/fish/fish.h +++ b/fish/fish.h @@ -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 */ |