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

    • Icon: Task Task
    • Resolution: Inactive
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • NXP i.MX6

      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*)}

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

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

              Created:
              Updated:
              Resolved: