pkgsrc/textproc/chasen-base/patches/patch-al
shannonjr ae68b0fb15 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.
2004-06-01 08:23:29 +00:00

13 lines
525 B
Text

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