[Bug 271392] misc/pinfo: build fails on 13.2

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 13 May 2023 18:59:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271392

            Bug ID: 271392
           Summary: misc/pinfo: build fails on 13.2
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: otis@FreeBSD.org
          Reporter: alexey@ocaml.nl
             Flags: maintainer-feedback?(otis@FreeBSD.org)
          Assignee: otis@FreeBSD.org

Created attachment 242145
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=242145&action=edit
Patch for fixing the compilation problem

I did

gitup ports && cd /usr/ports/misc/pinfo && make rmconfig clean install


and then pressed Enter to accept default options. I am using the 'latest'
branch for ports. The port failed to build:

...
--- pinfo-video.o ---
video.c:112:41: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2,
lines,((pos + maxy - 2) * 100) / lines);
                                       ~~             ^~~~~~~~~~~~~~
                                       %lu
video.c:112:57: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2,
lines,((pos + maxy - 2) * 100) / lines);
                                          ~~                          ^~~~~
                                          %lu
video.c:112:63: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2,
lines,((pos + maxy - 2) * 100) / lines);
                                              ~~                           
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                              %lu
video.c:114:42: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, 100%%"), lines, lines);
                                       ~~              ^~~~~
                                       %lu
video.c:114:49: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, 100%%"), lines, lines);
                                          ~~                  ^~~~~
                                          %lu
5 errors generated.
*** [pinfo-video.o] Error code 1

make[4]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13/src
1 error

make[4]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13/src

make[3]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13

make[2]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13
===> Compilation failed unexpectedly.
...

I attach the patch which fixes the compilation.

-- 
You are receiving this mail because:
You are the assignee for the bug.