Summary: | net-libs/ptlib-2.10.11 - ptclib/podbc.cxx:1220:21: error: no match for ‘operator==’ (operand types are ‘PString’ and ‘char’) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Martin von Gagern <Martin.vGagern> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | treecleaner |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 617524 | ||
Attachments: |
emerge --info
Patch to call IsEmpty |
Description
Martin von Gagern
2017-12-22 00:17:21 UTC
Created attachment 511430 [details, diff] Patch to call IsEmpty I've tried to work out what the code actually was doing in those gcc versions where it did compile. My assumption is that '\0' would get treated as ((const char*)null_ptr). include/ptlib/contain.inl says PString::operator==(const char *cstr) does an InternalCompare invocation which is implemented in src/ptlib/common/contain.cxx. That has an explicit check for NULL, and in that case will do an IsEmpty() check, which in turn tests for NULL array or '\0' at beginning of array. This the proposed fix is to call IsEmpty directly. Together with the patch from bug 638122 comment 8 this made the package compile. Not tested at runtime, and haven't performed build time tests either. Gone |