NetBSD-Bugs archive

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

kern/46976: Fix compiler warning about pointer conversion



>Number:         46976
>Category:       kern
>Synopsis:       Fix compiler warning about pointer conversion
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 17 19:40:01 +0000 2012
>Originator:     Richard Huveneers
>Release:        $NetBSD: libhfs.c,v 1.12 2012/07/28 00:43:23 matt Exp $
>Organization:
NA
>Environment:
>Description:
Compiling /sys/fs/hfs/libhfs.c:

libhfs.c:1584:5: Passing 'uint16_t *' (aka 'unsigned short *') to parameter of 
type 'int16_t *' (aka 'short *') converts between pointers to integer types 
with different sign

>How-To-Repeat:

>Fix:
***************
*** 1577,1583 ****
                   out_node_descriptor->kind == HFS_INDEXNODE)
                {
                        hfs_catalog_key_t       reckey;
!                       uint16_t                        rectype;
                        
                        rectype = out_node_descriptor->kind;
                        last_bytes_read = hfslib_read_catalog_keyed_record(ptr, 
NULL,
--- 1577,1583 ----
                   out_node_descriptor->kind == HFS_INDEXNODE)
                {
                        hfs_catalog_key_t       reckey;
!                       int16_t                 rectype;
                        
                        rectype = out_node_descriptor->kind;
                        last_bytes_read = hfslib_read_catalog_keyed_record(ptr, 
NULL,



Home | Main Index | Thread Index | Old Index