Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 786276

Summary: net-dns/ndu-0.4-r4 - ndu.cpp: error: ordered comparison of pointer with integer zero (char* and int)
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: ionen, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 732706    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
net-dns:ndu-0.4-r4:20210428-043448.log
temp.tar.bz2

Description Toralf Förster gentoo-dev 2021-04-28 07:12:17 UTC
      |                                                          ^~~~~~
ndu.cpp: In member function ‘void zone::process(char*)’:
ndu.cpp:407:64: error: ordered comparison of pointer with integer zero (‘char*’ and ‘int’)
  407 |                         if(strstr(name->pchar(), IN_ADDR_ARPA) > 0)
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
ndu.cpp:415:35: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  415 |                         fqfn->cat("/");

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no-multilib-20210423-202814

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-10.3.0
 [3] x86_64-pc-linux-gnu-11.1.0 *
clang version 12.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/12/bin
/usr/lib/llvm/12
12.0.0
Python 3.8.9
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.51.0 *
The Glorious Glasgow Haskell Compilation System, version 8.10.4

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Wed Apr 28 02:50:11 UTC 2021

emerge -qpvO net-dns/ndu
[ebuild  N    ] net-dns/ndu-0.4-r4
Comment 1 Toralf Förster gentoo-dev 2021-04-28 07:12:18 UTC
Created attachment 702981 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-04-28 07:12:20 UTC
Created attachment 702984 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-04-28 07:12:21 UTC
Created attachment 702987 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-04-28 07:12:22 UTC
Created attachment 702990 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-04-28 07:12:23 UTC
Created attachment 702993 [details]
net-dns:ndu-0.4-r4:20210428-043448.log
Comment 6 Toralf Förster gentoo-dev 2021-04-28 07:12:24 UTC
Created attachment 702996 [details]
temp.tar.bz2
Comment 7 Larry the Git Cow gentoo-dev 2021-06-15 02:41:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d727dd766dd56973f855dba2437c1edcd4261c2

commit 2d727dd766dd56973f855dba2437c1edcd4261c2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-06-15 02:39:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-06-15 02:39:50 +0000

    net-dns/ndu: fix build with GCC 11
    
    Closes: https://bugs.gentoo.org/786276
    Signed-off-by: Sam James <sam@gentoo.org>

 .../ndu-0.4-fix-pointer-comparison-with-0.patch    | 26 ++++++++++++++++++++++
 net-dns/ndu/ndu-0.4-r4.ebuild                      |  5 +++--
 2 files changed, 29 insertions(+), 2 deletions(-)