diff options
author | shannonjr <shannonjr@pkgsrc.org> | 2004-06-01 08:23:29 +0000 |
---|---|---|
committer | shannonjr <shannonjr@pkgsrc.org> | 2004-06-01 08:23:29 +0000 |
commit | ae68b0fb15df2c36c10c89ffe0bf28cbeb6e7226 (patch) | |
tree | 85fda63217a4e7b00540ba05f464e231b72e05d0 /textproc/chasen-base/patches | |
parent | 8ea4f2f10bfb3bcab3bf3e27c83c11190d7dbb4f (diff) | |
download | pkgsrc-ae68b0fb15df2c36c10c89ffe0bf28cbeb6e7226.tar.gz |
Re: PR 25715 Compilation error with gcc 3.4.0
dartsdic.cpp:180: error: ISO C++ forbids cast to non-reference type used
as lvalue
The patch corrects the compilation error by rewriting the cast without
changing the meaning of the statement. This closes the PR.
Diffstat (limited to 'textproc/chasen-base/patches')
-rw-r--r-- | textproc/chasen-base/patches/patch-al | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/textproc/chasen-base/patches/patch-al b/textproc/chasen-base/patches/patch-al new file mode 100644 index 00000000000..e2fd1e580ba --- /dev/null +++ b/textproc/chasen-base/patches/patch-al @@ -0,0 +1,13 @@ +$NetBSD: patch-al,v 1.1 2004/06/01 08:23:29 shannonjr Exp $ + +--- lib/dartsdic.cpp.orig 2003-07-30 10:06:57.000000000 -0600 ++++ lib/dartsdic.cpp +@@ -177,7 +177,7 @@ da_build_dump(da_build_t* builder, char* + lex_indices.push_back(i->second); + } + lens[size] = key.size(); +- (const char*)keys[size] = key.data(); ++ keys[size] = const_cast<char*>(key.data()); + vals[size] = redump_lex(lens[size], lex_indices, tmpfile, lexfile); + if (vals[size] < 0) { + std::cerr << "Unexpected error at " << key << std::endl; |