Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix some warnings when compiling with mingw #2868

Merged
merged 8 commits into from
Mar 7, 2024

Conversation

yomnes0
Copy link
Collaborator

@yomnes0 yomnes0 commented Feb 9, 2024

fixes #2862
Removed duplicate declaration of SRT_API
Moved around variables to avoid set but not used warnings

Removed duplicate declaration of SRT_API
Moved around variables to avoid set but not used warnings
@yomnes0 yomnes0 marked this pull request as ready for review February 9, 2024 11:22
@maxsharabayko maxsharabayko added this to the v1.5.4 milestone Feb 9, 2024
@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core labels Feb 9, 2024
srtcore/channel.cpp Outdated Show resolved Hide resolved
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.81%. Comparing base (4c443d6) to head (55c028c).
Report is 18 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2868       +/-   ##
===========================================
- Coverage   67.26%   48.81%   -18.46%     
===========================================
  Files         103      141       +38     
  Lines       20460    23356     +2896     
===========================================
- Hits        13763    11401     -2362     
- Misses       6697    11955     +5258     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@maxsharabayko maxsharabayko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the definition of the SRT_API must stay in srt.h.

This was also noted by @ethouris in his comment

The definition of SRT_API should still stay in this file, but then this symbol shall not be used anywhere else in the SRT code than this exactly file.

Add srt.h include where needed
srtcore/srt_compat.c Outdated Show resolved Hide resolved
srtcore/srt_compat.h Show resolved Hide resolved
srtcore/channel.cpp Outdated Show resolved Hide resolved
@maxsharabayko maxsharabayko merged commit 9b8aaa6 into Haivision:master Mar 7, 2024
11 of 12 checks passed
@yomnes0 yomnes0 deleted the mingw branch March 7, 2024 17:19
@Andarwinux
Copy link

This causes ffmpeg can't find srt_compat.h when libsrt is enabled.

x86_64-w64-mingw32/include/srt/srt.h:39:10: fatal error: 'srt_compat.h' file not found
   39 | #include "srt_compat.h"
      |          ^~~~~~~~~~~~~~
1 error generated.
ERROR: srt >= 1.3.0 not found using pkg-config

@yomnes0 yomnes0 restored the mingw branch March 8, 2024 07:43
@yomnes0 yomnes0 deleted the mingw branch March 8, 2024 07:44
@yomnes0
Copy link
Collaborator Author

yomnes0 commented Mar 8, 2024

This include should not be there, it will be fixed soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build warnings on minGW
4 participants