Skip to content

unit1604.c: fix implicit conv from 'SANITIZEcode' to 'CURLcode' - #5476

Closed
mback2k wants to merge 1 commit into
curl:masterfrom
mback2k:fix-unit1604-enum-conv
Closed

unit1604.c: fix implicit conv from 'SANITIZEcode' to 'CURLcode'#5476
mback2k wants to merge 1 commit into
curl:masterfrom
mback2k:fix-unit1604-enum-conv

Conversation

@mback2k

@mback2k mback2k commented May 28, 2020

Copy link
Copy Markdown
Member

GCC 10 warns about this with warning: implicit conversion
from 'SANITIZEcode' to 'CURLcode' [-Wenum-conversion]

Since 'expected_result' is not really of type 'CURLcode' and
it is not exposed in any way, we can just use 'SANITIZEcode'.

GCC 10 warns about this with warning: implicit conversion
  from 'SANITIZEcode' to 'CURLcode' [-Wenum-conversion]

Since 'expected_result' is not really of type 'CURLcode' and
it is not exposed in any way, we can just use 'SANITIZEcode'.
@mback2k mback2k added tests Windows Windows-specific labels May 28, 2020
@mback2k
mback2k requested a review from bagder May 28, 2020 19:52
@mback2k mback2k self-assigned this May 28, 2020
Comment thread tests/unit/unit1604.c
SANITIZEcode res;

CURLcode res = sanitize_file_name(&output, data[i].input, data[i].flags);
res = sanitize_file_name(&output, data[i].input, data[i].flags);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You could also just merge these two lines into a single statement...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I could, but then it would exceed the line length limit.

@mback2k mback2k closed this in 62314d6 May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants