Sciclient: gSciclientHandle initialization throws an error with GHS Safety Compiler

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Urgent
    • PDK
    • PDK-14259
    • PROCESSOR_SDK_09.02.00
    • Hide
      PROCESSOR_SDK_10.00.00
      PROCESSOR_SDK_09.02.01
      Show
      PROCESSOR_SDK_10.00.00 PROCESSOR_SDK_09.02.01
    • Hide
      j721e-evm
      j7200-evm
      j721s2-evm
      j784s4-evm
      Show
      j721e-evm j7200-evm j721s2-evm j784s4-evm

      Description
      gSciclientHandle was 0 initialized in the following manner:
      Sciclient_ServiceHandle_t gSciclientHandle = (Sciclient_ServiceHandle_t)0;

      This resulted in a GHS compiler error:
      ".../packages/ti/drv/sciclient/src/sciclient/sciclient.c", line 128 (col. 5): warning #520-D: initialization with "

      {...}

      " expected for aggregate object
      ".../packages/ti/drv/sciclient/src/sciclient/sciclient.c", line 128 (col. 5): error #28: expression must have a constant value

      Resolution
      The handle is now initialized as:
      Sciclient_ServiceHandle_t gSciclientHandle = 0;

      Root Cause
      GHS compiler doesn't support compounded literal init for structs

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-4551 - Sciclient: gSciclientHandle initial...
                SYNCHRONIZED
                • Last Sync Date: