Skip to content
Snippets Groups Projects

Fix build

Merged Daniel Bermond requested to merge dbermond/libndi:fix-build into master
All threads resolved!

The current code fails to build with the following error:

../libndi/libndi.c: In function ‘process_audio_message’:
../libndi/libndi.c:293:33: error: expected ‘;’ before ‘{’ token
  293 |                 } else(bps == 4) {
      |                                 ^~
      |                                 ;

The else block does not accept a condition. This can be fixed by changing else(bps == 4) to else if(bps == 4).

After doing this change, another error is shown:

../libndi/libndi.c: In function ‘process_audio_message’:
../libndi/libndi.c:297:57: error: incompatible type for argument 2 of ‘memcpy’
  297 |                     memcpy(&ndi_data.buf[i]->data[4*j], sf, sizeof(sf));
      |                                                         ^~
      |                                                         |
      |                                                         float

memcpy src argument needs a pointer, not a direct float value.

Both errors are caused by commit 4bd2c9df.

Tested with gcc 10.1.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Daniel Bermond added 1 commit

    added 1 commit

    Compare with previous version

  • Author Contributor

    @kierank True, thanks. I've updated the merge request.

  • Jean-Baptiste Kempf resolved all threads

    resolved all threads

  • Please register or sign in to reply
    Loading