This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler warnings rebuilding CSL v 2.10 for C5505 in CCS v 5.2

I am trying to rebuild CSL v 2.10 for C5505 in CCS v 5.2.The version of C5500 compiler is 4.4.1

The build generally succeeded but I am getting the following warnings:

'C5500 Compiler: C:/CCS5.2/c55xx_csl/src/csl_audioClass.c'
"C:/CCS5.2/c55xx_csl/build/cslVC5505/../../inc/csl_audioClassAux.h", line 314: warning #225-D: function declared implicitly
"C:/CCS5.2/c55xx_csl/src/csl_audioClass.c", line 963: warning #225-D: function declared implicitly

'C5500 Compiler: C:/CCS5.2/c55xx_csl/src/csl_msc.c'
"C:/CCS5.2/c55xx_csl/build/cslVC5505/../../inc/csl_mscAux.h", line 1021: warning #225-D: function declared implicitly
"C:/CCS5.2/c55xx_csl/src/csl_msc.c", line 2332: warning #225-D: function declared implicitly

Here are the code lines, compiler complaints about:


csl_audioClassAux.h", line 314:

        USB_setConfiguration(devNum,usbSetup->wValue);

csl_audioClass.c", line 963:

                 strLen = strlen(pCtrlHandle->strDescr[usbSetup->wValue & CSL_AC_8BIT_MASK]);

csl_mscAux.h", line 1021

        USB_setConfiguration(devNum,usbSetup->wValue);

csl_msc.c", line 2332:

strLen = strlen(pCtrlHandle->strDescr[usbSetup->wValue & CSL_MSC_8BIT_MASK]);

Can anyone advise why I am getting these warning and how to fix them?

Thanks

  • You get this error when the code calls a function for which it has failed to provide a prototype.  The prototype for strlen is in string.h.  csl_msc.c should include string.h, directly or through a header file.  Similarly, csl_audioClass.c should provide a prototype for USB_setConfiguration, either directly or through including the proper CSL header file.  Both of these are problems with the CSL source code.  Without a proper prototype, the compiler will guess what the prototype should be based on the arguments to the function as it is called.  This is often correct, and I would guess that it's correct in this case, in which case you can ignore the warnings.  However, this should still be fixed in the CSL source code.  Unfortunately, I do not know where to report such bugs.

  • Archaelogist, thank you for very helpful answer.

    I also noticed that in release build I get the following warnings. Could you please comment on them as well?

    'C5500 Compiler: C:/LPS/RossLPApps_CCS5.2/c55xx_csl/src/csl_nand.c'
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 500: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 505: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 505: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 505: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 591: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 733: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 737: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1206: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1206: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1206: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1213: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1213: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1213: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1224: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1224: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1224: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1314: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1314: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1314: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1322: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1322: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1322: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1333: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1333: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1333: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1336: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1336: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1351: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1351: warning #1107-D: conversion from integer to smaller pointer
    "C:/CCS5.2/c55xx_csl/src/csl_nand.c", line 1351: warning #1107-D: conversion from integer to smaller pointer

  • That's tougher to explain.  I cannot say whether it indicates a problem without seeing more of the code, but it is most likely harmless.

    The C standard allows you to convert pointer values to integral types and vice versa.  These conversions are implementation-defined, which means the standard can't tell you exactly how the bits can be interpreted, but the compiler is required to do something reasonable and consistent.

    This warning means that there is a conversion from an integer type (perhaps "long") to a pointer type.  The integer type has more bits than the pointer type, so some of those bits are going to get discarded.  If these discarded bits are zero, there is no problem.  If these discarded bits are not zero, the integer value represents a value that cannot be correctly represented as a pointer, and this makes the compiler worried; what if the user thought the conversion was going to be exact?  Is it important that information is lost?  It's impossible for the compiler to know for sure, so the user is expected to examine each instance of the warning.

    This warning pops up more frequently on architectures like C54x, which has only 16-bit data pointers.

  • Thank you for your response. As far as I understand C5505 also has only 16-bit data and pointers.

  • C55x devices have 23-bit pointers in large memory model.