PC-Lint Support

Running PC-Lint

You will need to have PC-Lint from Gimpel installed. If you do, you can generate a report by running the following:

cd \wherever_fip_is\fip\source
lint-nt.exe -i\wherever_fip_is\fip\verification\pclint avr_gcc.lnt project.lnt

If you are using Eclipse this can be run as a MAKE target. Additionally the output can be parsed by REGEXP, see project.lnt & http://www.newae.com/tiki-index.php?page=LintEclipse for details.

Full PC-Lint Report

The following is a copy of the full PC-Lint report in HTML format.
--- Module: corenet\fip_icmp6.c (C)

                                                  _
    er->sequenceNumber = fip_hton16(sequenceNumber);
LINT Info: corenet\fip_icmp6.c:252 727 Symbol 'sequenceNumber' (line 234) not explicitly initialized
                               _
        er->data[offset] = data;
LINT Info: corenet\fip_icmp6.c:273 732 Loss of sign (assignment) (char to unsigned char)
_
}
LINT Info: corenet\fip_icmp6.c:281 818 Pointer parameter 'destAddr' (line 222) could be declared as pointing to const
LINT Info: corenet\fip_icmp6.c:281 843 Variable 'sequenceNumber' (line 234) could be declared as const

--- Wrap-up for Module: corenet\fip_icmp6.c

LINT Info: ..\verification\pclint\project.lnt:39 752 local declarator 'rpl_icmp6_process(void)' (line 46, file corenet\fip_icmp6.c) not referenced

--- Module: corenet\fip_if.c (C)

_
}
LINT Info: corenet\fip_if.c:150 818 Pointer parameter 'defaultPacketBufSizes' (line 71) could be declared as pointing to const
                                                                                                                                  _
    return fip_if6_addUnicastAddress(ifnum, &newaddr, fip_if[ifnum].v6.myPrefixs[prefixIndex].validUntil, ADDR_AUTOCONF, LLIndex, true);
LINT Info: corenet\fip_if.c:270 747 Significant prototype coercion (arg. no. 6) int to bool

--- Module: corenet\fip_ip.c (C)


--- Module: corenet\fip_nd6_ds6.c (C)


--- Module: corenet\fip_nd6_generate.c (C)


--- Module: corenet\fip_nd6_process.c (C)


--- Module: corenet\fip_nd6.c (C)


--- Module: corenet\fip_route6.c (C)


--- Module: debug\fip_console.c (C)

                                                                                              _
                    if(fip_if6_addUnicastAddress(ifnum, &ipaddr, (uint32_t)0, ADDR_MANUAL, 0, false) != RV_OK)
LINT Info: debug\fip_console.c:687 747 Significant prototype coercion (arg. no. 6) int to bool
                                                                     _
            if(fip_route6_addRoute(route.addr, routeLen, 10, ifNum, 0, &nextHop, (fip_bool_t)false) != RV_OK)
LINT Info: debug\fip_console.c:1021 747 Significant prototype coercion (arg. no. 5) int to unsigned long
_
}
LINT Info: debug\fip_console.c:1087 715 Symbol 'parameter' (line 1082) not referenced
LINT Info: debug\fip_console.c:1087 818 Pointer parameter 'parameter' (line 1082) could be declared as pointing to const
_
}
LINT Info: debug\fip_console.c:1095 715 Symbol 'parameter' (line 1089) not referenced
LINT Info: debug\fip_console.c:1095 818 Pointer parameter 'parameter' (line 1089) could be declared as pointing to const
                                                                           _
                if(fip_udp_sendSetup(IPV6, ipaddr.addr, destPort, localConn, numBytes, 0) != RV_OK)
LINT Info: debug\fip_console.c:1172 734 Loss of precision (arg. no. 4) (16 bits to 8 bits)

--- Module: debug\fip_trace.c (C)

                                 _
    #define TRACE_DEFINE_STRINGS 1
LINT Info: debug\fip_trace.c:53 767 macro 'TRACE_DEFINE_STRINGS' was defined differently in another module (line 175, file debug\fip_trace.h, module debug\fip_console.c)
                                                    _
    unsigned char ipaddr[16] = {0x20, 0x02, [15] = 1};
LINT Info: debug\fip_trace.c:86 785 Too few initializers for aggregate 'ipaddr' of type 'unsigned char [16]'

--- Wrap-up for Module: debug\fip_trace.c

LINT Info: ..\verification\pclint\project.lnt:50 750 local macro 'FIP_TRACE_SERIALPP' (line 40, file debug\fip_trace.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:50 750 local macro 'FIP_TRACE_STUB' (line 41, file debug\fip_trace.c) not referenced

--- Module: framework\fip_ds6.c (C)


--- Module: framework\fip_ipUtils.c (C)

_
}
LINT Info: framework\fip_ipUtils.c:124 818 Pointer parameter 'data' (line 88) could be declared as pointing to const

--- Module: framework\fip_packet.c (C)


--- Module: framework\fip_rand.c (C)

         _
#include "stdint.h"
LINT Warning: framework\fip_rand.c:66 537 Repeated include file 'C:\WinAVR-20100110\avr\include\stdint.h'
                                                                            _
static uint16_t * const fip_random_number16 = (uint16_t *)&fip_random_number;
LINT Info: framework\fip_rand.c:96 740 Unusual pointer cast (incompatible indirect types)

--- Wrap-up for Module: framework\fip_rand.c

LINT Info: ..\verification\pclint\project.lnt:56 844 Pointer variable 'fip_random_number16' (line 96, file framework\fip_rand.c) could be declared as pointing to const
LINT Info: ..\verification\pclint\project.lnt:56 844 Pointer variable 'fip_random_number32' (line 91, file framework\fip_rand.c) could be declared as pointing to const
LINT Info: ..\verification\pclint\project.lnt:56 844 Pointer variable 'fip_random_number8' (line 101, file framework\fip_rand.c) could be declared as pointing to const

--- Module: framework\fip_timer.c (C)


--- Module: sixlowpan\fip_nd6_6lowpan.c (C)

_
}
LINT Info: sixlowpan\fip_nd6_6lowpan.c:560 818 Pointer parameter 'aro' (line 538) could be declared as pointing to const
                                                                                     _
    fip_nd6_6lowpan_LBRTableNewEntry(tempNC_shortAddr, tempNC_eui64, tempNC_lifetime);
LINT Warning: sixlowpan\fip_nd6_6lowpan.c:593 534 Ignoring return value of function 'fip_nd6_6lowpan_LBRTableNewEntry(const unsigned char *, const unsigned char *, unsigned int)' (compare with line 231, file sixlowpan\fip_sixlowpan.h, module corenet\fip_icmp6.c)
                                                                                            _
    fip_nd6_6lowpan_da_t * da = (fip_nd6_6lowpan_da_t * const)fip_packet_getBufPtr(FIP_TLBUF);
LINT Info: sixlowpan\fip_nd6_6lowpan.c:704 826 Suspicious pointer-to-pointer conversion (area too small)
_
}
LINT Info: sixlowpan\fip_nd6_6lowpan.c:719 818 Pointer parameter 'eui64' (line 691) could be declared as pointing to const
LINT Info: sixlowpan\fip_nd6_6lowpan.c:719 818 Pointer parameter 'raddr' (line 692) could be declared as pointing to const

During Specific Walk:
sixlowpan\fip_nd6_6lowpan.c  528  fip_nd6_6lowpan_daGenerate(156, ?, ?, [8], [16]) #1
LINT Info: sixlowpan\fip_nd6_6lowpan.c:704 826 Suspicious pointer-to-pointer conversion (area too small)

During Specific Walk:
sixlowpan\fip_nd6_6lowpan.c  682  fip_nd6_6lowpan_daGenerate(157, 0?, ?, [8], [16]) #2
LINT Info: sixlowpan\fip_nd6_6lowpan.c:704 826 Suspicious pointer-to-pointer conversion (area too small)

During Specific Walk:
corenet\fip_nd6_process.c  98  fip_nd6_6lowpan_processDAR() #1
sixlowpan\fip_nd6_6lowpan.c  682  fip_nd6_6lowpan_daGenerate(157, 0?, ?, [8], [16]) #3
LINT Info: sixlowpan\fip_nd6_6lowpan.c:704 826 Suspicious pointer-to-pointer conversion (area too small)
_
}
LINT Info: sixlowpan\fip_nd6_6lowpan.c:788 715 Symbol 'lifetime' (line 783) not referenced

--- Module: sixlowpan\fip_sixlowpan_hc.c (C)

_
}
LINT Info: sixlowpan\fip_sixlowpan_hc.c:138 818 Pointer parameter 'LLAddr' (line 106) could be declared as pointing to const
                                                      _
    *ipbuf++ = (dscp << 6) | (ecn >> 2) | flowlabel[0];
LINT Info: sixlowpan\fip_sixlowpan_hc.c:230 734 Loss of precision (assignment) (14 bits to 8 bits)
                                                                      _
                uint16_t udpSize = payloadLen - (inlinedPtr - payload);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:463 732 Loss of sign (initialization) (int to unsigned int)
                                                                 _
    unsigned char bytesLeft = payloadLen - (inlinedPtr - payload);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:537 734 Loss of precision (initialization) (15 bits to 8 bits)
                                                     _
    packetLength = (ipbuf - fip_packet_getIPBufPtr());
LINT Info: sixlowpan\fip_sixlowpan_hc.c:543 734 Loss of precision (assignment) (15 bits to 8 bits)
LINT Info: sixlowpan\fip_sixlowpan_hc.c:543 838 Previously assigned value to variable 'packetLength' has not been used
_
}
LINT Info: sixlowpan\fip_sixlowpan_hc.c:615 818 Pointer parameter 'LLAddr' (line 573) could be declared as pointing to const
                                                                 _
    int  uncompressedBufLeft = fip_packet_getBufSize(FIP_IPHDRBUF);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:692 713 Loss of precision (initialization) (unsigned int to int)
                                                                                                              _
        *iphcByte2 |= sixComprAddr(fip_packet_getFromIP6Hdr_srcPtr() + 8, srcAddr, srcLength, &inlinedPtr) << SLP_IPHC2_SAM_OFFSET;
LINT Info: sixlowpan\fip_sixlowpan_hc.c:805 734 Loss of precision (assignment) (12 bits to 8 bits)
                                                                                                                  _
            *iphcByte2 |= sixComprAddr(fip_packet_getFromIP6Hdr_srcPtr() + 8, srcAddr, srcLength, &inlinedPtr) << SLP_IPHC2_SAM_OFFSET;
LINT Info: sixlowpan\fip_sixlowpan_hc.c:814 734 Loss of precision (assignment) (12 bits to 8 bits)
                                                       _
    savedBytes = uncompressedBufLeft - compressedLength;
LINT Info: sixlowpan\fip_sixlowpan_hc.c:881 732 Loss of sign (assignment) (int to unsigned int)
                                                                           _
            while(0 == (uncompressedBufLeft = fip_packet_getBufSize(thisBuf)))
LINT Info: sixlowpan\fip_sixlowpan_hc.c:915 713 Loss of precision (assignment) (unsigned int to int)
                                                                                  _
                    *inlinedPtr++ = ((srcPort & 0x000F) << 8) | (dstPort & 0x000F);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:948 734 Loss of precision (assignment) (12 bits to 8 bits)
                                                                              _
                savedBytes += sizeof(fip_udp_header_t) - (inlinedPtr - udpNhc);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:980 737 Loss of sign in promotion from int to unsigned int
                                                               _
                uncompressedBufLeft -= sizeof(fip_udp_header_t);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:984 737 Loss of sign in promotion from int to unsigned int
LINT Info: sixlowpan\fip_sixlowpan_hc.c:984 713 Loss of precision (assignment) (unsigned int to int)
                                                        _
    fip_packet_setBufSize(FIP_IPHDRBUF, compressedLength);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:1097 732 Loss of sign (assignment) (int to unsigned int)
                                                          _
        fip_packet_setBufSize(thisBuf, uncompressedBufLeft);
LINT Info: sixlowpan\fip_sixlowpan_hc.c:1104 732 Loss of sign (assignment) (int to unsigned int)

--- Wrap-up for Module: sixlowpan\fip_sixlowpan_hc.c

LINT Info: ..\verification\pclint\project.lnt:61 751 local typedef 'fip_ipv6_exthdr_t' (line 89, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 750 local macro 'SLP_IPHC2_SAM_01' (line 61, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 750 local macro 'SLP_IPHC2_SAM_10' (line 62, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 750 local macro 'SLP_NHC_EH_FH' (line 77, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 750 local macro 'SLP_NHC_EH_DOH' (line 78, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 750 local macro 'SLP_NHC_EH_MH' (line 79, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 750 local macro 'SLP_NHC_EH_IP' (line 80, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 754 local structure member 'nextHeader' (line 87, file sixlowpan\fip_sixlowpan_hc.c) not referenced
LINT Info: ..\verification\pclint\project.lnt:61 754 local structure member 'length' (line 88, file sixlowpan\fip_sixlowpan_hc.c) not referenced

--- Module: sixlowpan\fip_sixlowpan.c (C)

                                                                                                                           _
            if(fip_hostInterface_sixSendSetup((uint8_t *)srcAddr, srcLength, (uint8_t *)destAddr, destLength, destBroadcast))
LINT Info: sixlowpan\fip_sixlowpan.c:310 747 Significant prototype coercion (arg. no. 5) unsigned char to bool
                                                                                                                           _
            if(fip_hostInterface_sixSendSetup((uint8_t *)srcAddr, srcLength, (uint8_t *)destAddr, destLength, destBroadcast))
LINT Info: sixlowpan\fip_sixlowpan.c:319 747 Significant prototype coercion (arg. no. 5) unsigned char to bool
                                                                                                         _
                    fip_hostInterface_sixSendCopyPayload(fip_packet_getBufPtr(i), fip_packet_getBufSize(i));
LINT Info: sixlowpan\fip_sixlowpan.c:325 734 Loss of precision (arg. no. 2) (16 bits to 8 bits)
                                                                                                                       _
        if(fip_hostInterface_sixSendSetup((uint8_t *)srcAddr, srcLength, (uint8_t *)destAddr, destLength, destBroadcast))
LINT Info: sixlowpan\fip_sixlowpan.c:369 747 Significant prototype coercion (arg. no. 5) unsigned char to bool
                                                                                                                                                      _
            TRACE_ADDVAR(ERROR, UNSIGNED, HOST, "IP Headers Length", &fip_packet_getBufSize(FIP_IPHDRBUF), sizeof(fip_packet_getBufSize(FIP_IPHDRBUF)));
LINT Info: sixlowpan\fip_sixlowpan.c:440 866 Unusual use of 'SYM' in argument to sizeof
                                                                                                             _
            newOffset = (fip_packet_getBufSize(FIP_IPHDRBUF) + fip_sixlowpan_Attr(paddingPresent) + toSend)/8;
LINT Info: sixlowpan\fip_sixlowpan.c:454 734 Loss of precision (assignment) (16 bits to 8 bits)
                                                                       _
                unsigned char dataToSend = MIN(dataInThisBuffer, toSend);
LINT Info: sixlowpan\fip_sixlowpan.c:463 734 Loss of precision (initialization) (16 bits to 8 bits)
                                                                       _
        newOffset = (8*(fip_sixlowpan_Attr(datagramOffset)) + toSend)/8;
LINT Info: sixlowpan\fip_sixlowpan.c:484 734 Loss of precision (assignment) (16 bits to 8 bits)
                                                                   _
            unsigned char dataToSend = MIN(dataInThisBuffer, toSend);
LINT Info: sixlowpan\fip_sixlowpan.c:493 734 Loss of precision (initialization) (16 bits to 8 bits)

--- Wrap-up for Module: sixlowpan\fip_sixlowpan.c

LINT Info: ..\verification\pclint\project.lnt:62 766 Header file '.\fip_internal.h' not used in module 'fip_sixlowpan.c'

--- Module: transportlayers\fip_udp.c (C)

    _
    for(i = 1; i < FIP_UDP_NUM_CONNS; i++)
LINT Info: transportlayers\fip_udp.c:152 850 for loop index variable 'i' whose type category is 'integral' is modified in body of the for loop that began at 'line 117'
_
}
LINT Info: transportlayers\fip_udp.c:248 818 Pointer parameter 'destIPAddr' (line 182) could be declared as pointing to const

--- Module: fip.c (C)


--- Global Wrap-up

LINT Info 765 external 'rplTestMode' (line 61, file debug\fip_console.c) could be made static
LINT Info 714 Symbol 'rplTestMode' (line 61, file debug\fip_console.c) not referenced
LINT Info 765 external 'tempNC_eui64' (line 77, file sixlowpan\fip_nd6_6lowpan.c) could be made static
LINT Info 765 external 'tempNC_address' (line 78, file sixlowpan\fip_nd6_6lowpan.c) could be made static
LINT Info 765 external 'tempNC_lifetime' (line 76, file sixlowpan\fip_nd6_6lowpan.c) could be made static
LINT Info 765 external 'tempNC_shortAddr' (line 79, file sixlowpan\fip_nd6_6lowpan.c) could be made static
LINT Info 765 external 'sendHopByHop' (line 49, file corenet\fip_ip.c) could be made static
LINT Info 714 Symbol 'sendHopByHop' (line 49, file corenet\fip_ip.c) not referenced
LINT Info 765 external 'fip_nd6_6lowpan_lbrTable' (line 81, file sixlowpan\fip_nd6_6lowpan.c) could be made static
LINT Info 765 external 'fip_nd6_processLLAO(unsigned char)' (line 644, file corenet\fip_nd6_process.c) could be made static
LINT Info 765 external 'fip_rand8Limited(unsigned char)' (line 131, file framework\fip_rand.c) could be made static
LINT Info 714 Symbol 'fip_rand8Limited(unsigned char)' (line 131, file framework\fip_rand.c) not referenced
LINT Info 765 external 'fip_rand8(void)' (line 141, file framework\fip_rand.c) could be made static
LINT Info 714 Symbol 'fip_rand8(void)' (line 141, file framework\fip_rand.c) not referenced
LINT Info 765 external 'fip_rand16(void)' (line 162, file framework\fip_rand.c) could be made static
LINT Info 714 Symbol 'fip_rand16(void)' (line 162, file framework\fip_rand.c) not referenced
LINT Info 765 external 'fip_rand16Limited(unsigned int)' (line 152, file framework\fip_rand.c) could be made static
LINT Info 714 Symbol 'fip_rand16Limited(unsigned int)' (line 152, file framework\fip_rand.c) not referenced
LINT Info 765 external 'fip_rand32Limited(unsigned long)' (line 173, file framework\fip_rand.c) could be made static
LINT Info 714 Symbol 'fip_rand32Limited(unsigned long)' (line 173, file framework\fip_rand.c) not referenced
LINT Info 765 external 'fip_rand32(void)' (line 183, file framework\fip_rand.c) could be made static
LINT Info 714 Symbol 'fip_rand32(void)' (line 183, file framework\fip_rand.c) not referenced
LINT Info 765 external 'fip_srand(unsigned long)' (line 121, file framework\fip_rand.c) could be made static
LINT Info 714 Symbol 'fip_srand(unsigned long)' (line 121, file framework\fip_rand.c) not referenced
LINT Info 765 external 'linkLocal' (line 48, file sixlowpan\fip_sixlowpan_hc.c) could be made static
LINT Info 843 Variable 'linkLocal' (line 48, file sixlowpan\fip_sixlowpan_hc.c) could be declared as const

Generated on Wed Dec 8 13:00:21 2010 for FIP by  doxygen 1.5.7.1