-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix some annoying warnings #12652
Fix some annoying warnings #12652
Conversation
b0de695
to
a95caa7
Compare
Go go brrrr. |
input_string.insert(cursor++, tmp); | ||
cursor_end = cursor; | ||
input_string += c; // resize | ||
std::memmove(input_string.data() + cursor + 1, input_string.data() + cursor, sizeof(u16) * (input_string.size() - 1 - cursor)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't wanna test this but this really looks weird.
From a quick glance this entire change seems to change the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work like before, I did workaround compiler bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's completely broken now
au.data = NULL; | ||
au.size = 0; | ||
} | ||
av_read_frame(fmt, packet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the result not checked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous code was destructor's job, so it shouldn't affect anything.
} | ||
|
||
} au(0); | ||
AVPacket* packet = av_packet_alloc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the object not checked for null?
@@ -148,7 +148,7 @@ int check_filename(std::string_view file_path, bool disallow_system_files, bool | |||
return 70; | |||
} | |||
|
|||
char name[CELL_SAVEDATA_FILENAME_SIZE - 3]; | |||
char name[CELL_SAVEDATA_FILENAME_SIZE + 3]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's harmless but it fixes annoying compiler bug (or some real bug I couldn't figure out)
AVPacket packet{}; | ||
av_init_packet(&packet); | ||
|
||
AVPacket* packet = av_packet_alloc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changed and why doesn't it check for null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk, it's probably null only on out of memory, which itself is very serious problem which can't be worked around easily.
No description provided.