Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xf86-video-nv/dist/src xf86-video-nv: fix Cla...



details:   https://anonhg.NetBSD.org/xsrc/rev/93fb13996ce9
branches:  trunk
changeset: 10724:93fb13996ce9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri May 21 19:09:50 2021 +0000

description:
xf86-video-nv: fix Clang build on amd64, i386, macppc

xsrc/external/mit/xf86-video-nv/dist/src/nv_setup.c:258:49: error:
passing 'char *' to parameter of type 'Uchar *' (aka 'unsigned char *')
converts between pointers to integer types with different sign
[-Werror,-Wpointer-sign]

        tmp = xf86InterpretEEDID(pScrn->scrnIndex, buffer);
                                                   ^~~~~~

diffstat:

 external/mit/xf86-video-nv/dist/src/nv_setup.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 7ef570c16d94 -r 93fb13996ce9 external/mit/xf86-video-nv/dist/src/nv_setup.c
--- a/external/mit/xf86-video-nv/dist/src/nv_setup.c    Wed May 19 08:28:15 2021 +0000
+++ b/external/mit/xf86-video-nv/dist/src/nv_setup.c    Fri May 21 19:09:50 2021 +0000
@@ -246,10 +246,10 @@
     if (!MonInfo) {
        /* ask wsdisplay */
        struct wsdisplayio_edid_info ei;
-       char *buffer;
+       Uchar *buffer;
        xf86MonPtr tmp;
 
-       buffer = malloc(1024);
+       buffer = malloc(1024);  /* XXX: missing null check */
        ei.edid_data = buffer;
        ei.buffer_size = 1024;
        if (ioctl(xf86Info.consoleFd, WSDISPLAYIO_GET_EDID, &ei) != -1) {



Home | Main Index | Thread Index | Old Index