Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-4012

imx8: Compile time error while trying to return from verb callback function

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Hardware Platform(s) Affected:
      NXP i.MX6

      Description

      Hi Jose,

      Thanks!

      I am unit testing radar service code, Calling verb callback function "virtual_read" but its failing because I am returning integer from that function. I could see callback has void return type but as I am doing unit testing(by googletest framework) of code need something to return to verify pass/fail. I tried something on external typecasting & void pointer also, Is there any way we can return?

      reference log:

       tests/../src/radar_service.c: At global scope:
      tests/../src/radar_service.c:1238:21: error: invalid conversion from 'int (afb_req_t)' {aka 'int (afb_req*)'} to 'void (afb_req*)' [-fpermissive]
       1238 |         .callback = virtual_read,
            |                     ^~~~~~~~~~~~
            |                     |
            |                     int (afb_req_t) {aka int (afb_req*)}

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            jobol-iot jose bollo
            Reporter:
            vsuneja63 vipul kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: