Fixing up some issues left over from windows build, and a pass at compiler warnings cleanup#291
Merged
Merged
Conversation
Sync with upstream
…r invocation under VisualStudio. Original code had an extra ";" after the struct entry, which was ignored by GCC but flagged as error by Visual Studio. Since MU_F_T/MU_F_V defintion already INCLUDES the ";", it must NOT be added when calling the macro.
Replaced a bunch of malloc/strncpy with strdup() Missing include for gettimeofday() when compiling with CAM disabled
trollcop
commented
Apr 28, 2022
| char name[MAX_NAME_LEN]; | ||
| mumu_f_t name_f; /* MU_F_T(name); */ | ||
| MU_F_T(name) | ||
| char service_name[MAX_NAME_LEN]; |
Contributor
Author
There was a problem hiding this comment.
original code had MU_F_T(name); which would end up as mumu_f_t name_f;; breaking the compiler
trollcop
commented
Apr 28, 2022
| tempchar=malloc(sizeof(char)*(len+1)); | ||
| if (tempchar == NULL) | ||
| return 0; | ||
| strncpy(tempchar,string,len); |
Contributor
Author
There was a problem hiding this comment.
there's gotta be a better pattern to do this either way.
trollcop
commented
Apr 28, 2022
| switch(descr->polarization) | ||
| { | ||
| log_message( log_module, MSG_FLOOD, "Polarization: (0x%02x)", descr->polarization); | ||
| case 0: |
Contributor
Author
There was a problem hiding this comment.
i think this is what you were trying to do, but either way it doens't belong inside switch()
trollcop
commented
Apr 28, 2022
| #ifndef _WIN32 | ||
| #include <sys/time.h> | ||
| #endif | ||
| #ifdef ENABLE_CAM_SUPPORT |
Contributor
Author
There was a problem hiding this comment.
cam.h includes that, but when ENABLE_CAM_SUPPORT is off that header isn't included
trollcop
added a commit
to trollcop/MuMuDVB
that referenced
this pull request
Apr 29, 2022
Merge pull request braice#291 from trollcop/master
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is slightly smaller than the last one :)
I've replaced MU_F_T/MU_F_V back to where they were before windows build patch - an extra ; was giving hell to msvc compiler but happily ignored by gcc.
Also replaced a bunch of malloc/strncpy patterns with strdup. Can't imagine any system made in the last 10+ years where strdup wasn't available, and it gets rid of a bunch of build warnings related to strncpy safety.