Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634104 - net-analyzer/ntopng-3.0-r1 - src/AddressResolution.cpp:55:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
Summary: net-analyzer/ntopng-3.0-r1 - src/AddressResolution.cpp:55:35: error: ISO C++ ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sławek Lis (RETIRED)
URL:
Whiteboard: ~arch only
Keywords:
Depends on:
Blocks: gcc-7
  Show dependency tree
 
Reported: 2017-10-12 16:14 UTC by Fred Krogh
Modified: 2018-06-09 11:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to incorrect pointer integer comparison. (zero-pointer-cmp.patch,525 bytes, patch)
2017-11-28 07:21 UTC, Zoltan Puskas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Krogh 2017-10-12 16:14:11 UTC
Not sure you want these, but here it is.

src/AddressResolution.cpp: In member function ‘void AddressResolution::resolveHostName(char*, char*, u_int)’:
src/AddressResolution.cpp:55:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   if((at = strchr(query, '@')) != '\0') at[0] = '\0';
                                   ^~~~
Comment 1 Zoltan Puskas 2017-11-28 07:21:47 UTC
Created attachment 506904 [details, diff]
Patch to incorrect pointer integer comparison.

Compiler is correct, strchr() will return NULL if character (in this case '@') is not found. Code tries to truncate string if '@' is found (starting from '@' symbol). This patch fixes the code and makes ntopng compile.
Comment 2 Sławek Lis (RETIRED) gentoo-dev 2017-12-07 06:35:19 UTC
Patch sent, thanks for your help
Comment 3 Spooky Ghost 2017-12-11 09:19:42 UTC
Not sure if it should be a new bug but the patch was added as files/pointer-cmp.patch but the ebuild line is "${FILESDIR}"/${P}-pointer-cmp.patch".  The mismatch in the name causes the build to fail.
Comment 4 Larry the Git Cow gentoo-dev 2018-01-22 21:03:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47316be9937674510b62d56065bacc467660d31f

commit 47316be9937674510b62d56065bacc467660d31f
Author:     Slawomir Lis <slis@gentoo.org>
AuthorDate: 2018-01-22 20:55:44 +0000
Commit:     Slawomir Lis <slis@gentoo.org>
CommitDate: 2018-01-22 21:00:30 +0000

    net-analyzer/ntopng: added sys-libs/binutils-libs dependency
    
    Closes: https://bugs.gentoo.org/634104
    Package-Manager: Portage-2.3.20, Repoman-2.3.6

 net-analyzer/ntopng/ntopng-3.0-r2.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)