../../../../dev/pci/drm/radeon_cs.c:746:34: error: passing 'int *' to parameter 
of type 'uint32_t *' (aka 'unsigned int *') converts between pointers to 
integer types with different sign
      [-Werror,-Wpointer-sign]
                        ret = r600_cs_packet0(parser, &count_dw);
                                                      ^~~~~~~~~
../../../../dev/pci/drm/radeon_cs.c:322:82: note: passing argument to parameter 
'offset_dw_p' here
static inline int r600_cs_packet0(struct drm_radeon_cs_parser *parser, uint32_t 
*offset_dw_p)
                                                                                
 ^
../../../../dev/pci/drm/radeon_cs.c:756:34: error: passing 'int *' to parameter 
of type 'uint32_t *' (aka 'unsigned int *') converts between pointers to 
integer types with different sign
      [-Werror,-Wpointer-sign]
                        ret = r600_cs_packet3(parser, &count_dw);
                                                      ^~~~~~~~~
../../../../dev/pci/drm/radeon_cs.c:353:82: note: passing argument to parameter 
'offset_dw_p' here
static inline int r600_cs_packet3(struct drm_radeon_cs_parser *parser, uint32_t 
*offset_dw_p)


Looking at how count_dw is used, as well as size_dw, within r600_cs_parse() I 
think
it makes sense to change these to uint32_t.

Comments?


Index: radeon_cs.c
===================================================================
RCS file: /home/cvs/src/sys/dev/pci/drm/radeon_cs.c,v
retrieving revision 1.2
diff -u -p -r1.2 radeon_cs.c
--- radeon_cs.c 2 Jun 2011 18:22:00 -0000       1.2
+++ radeon_cs.c 14 Aug 2012 10:29:44 -0000
@@ -731,7 +731,7 @@ static int r600_cs_parse(struct drm_rade
 {
        struct drm_radeon_kernel_chunk *ib_chunk;
        /* scan the packet for various things */
-       int count_dw = 0, size_dw;
+       uint32_t count_dw = 0, size_dw;
        int ret = 0;
 
        ib_chunk = &parser->chunks[parser->ib_index];

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to