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:
Jim Meyering
2009-08-21 14:55:39 +02:00
parent 05fd2a6046
commit 7b2d9feb82
2 changed files with 7 additions and 1 deletions

View File

@@ -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;

View File

@@ -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 */