Fix a few gcc warnings
Originally committed to SVN as r4722.
This commit is contained in:
parent
ce97d995b4
commit
46be23073e
9 changed files with 17 additions and 19 deletions
|
@ -156,26 +156,26 @@ void line_iterator<OutputType>::getline(std::string &str) {
|
|||
union {
|
||||
int32_t chr;
|
||||
char buf[4];
|
||||
};
|
||||
} u;
|
||||
|
||||
for (;;) {
|
||||
chr = 0;
|
||||
u.chr = 0;
|
||||
#ifdef _WIN32
|
||||
std::streamsize read = stream->rdbuf()->_Sgetn_s(buf, 4, width);
|
||||
std::streamsize read = stream->rdbuf()->_Sgetn_s(u.buf, 4, width);
|
||||
#else
|
||||
std::streamsize read = stream->rdbuf()->sgetn(buf, width);
|
||||
std::streamsize read = stream->rdbuf()->sgetn(u.buf, width);
|
||||
#endif
|
||||
if (read < (std::streamsize)width) {
|
||||
for (int i = 0; i < read; i++) {
|
||||
str += buf[i];
|
||||
str += u.buf[i];
|
||||
}
|
||||
stream->setstate(std::ios::eofbit);
|
||||
return;
|
||||
}
|
||||
if (chr == cr) continue;
|
||||
if (chr == lf) return;
|
||||
if (u.chr == cr) continue;
|
||||
if (u.chr == lf) return;
|
||||
for (int i = 0; i < read; i++) {
|
||||
str += buf[i];
|
||||
str += u.buf[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,8 +69,8 @@ namespace std {
|
|||
|
||||
/// @brief AssFile constructor
|
||||
AssFile::AssFile ()
|
||||
: loaded(false)
|
||||
, commitId(-1)
|
||||
: commitId(-1)
|
||||
, loaded(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -124,8 +124,8 @@ void AssDialogueBlockOverride::ProcessParameters(AssDialogueBlockOverride::Proce
|
|||
}
|
||||
|
||||
AssOverrideParamProto::AssOverrideParamProto(VariableDataType type,int opt,ASS_ParameterClass classi)
|
||||
: type(type)
|
||||
, optional(opt)
|
||||
: optional(opt)
|
||||
, type(type)
|
||||
, classification(classi)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -174,7 +174,8 @@ AssStyle::AssStyle()
|
|||
}
|
||||
|
||||
AssStyle::AssStyle(const AssStyle& s)
|
||||
: name(s.name)
|
||||
: AssEntry(s)
|
||||
, name(s.name)
|
||||
, font(s.font)
|
||||
, fontsize(s.fontsize)
|
||||
, primary(s.primary)
|
||||
|
|
|
@ -391,7 +391,6 @@ void AlsaPlayer::async_write_handler(snd_async_handler_t *pcm_callback)
|
|||
|
||||
void *buf = malloc(player->period * player->bpf);
|
||||
while (frames >= player->period) {
|
||||
unsigned long start = player->cur_frame;
|
||||
player->provider->GetAudioWithVolume(buf, player->cur_frame, player->period, player->volume);
|
||||
int err = snd_pcm_writei(player->pcm_handle, buf, player->period);
|
||||
if(err == -EPIPE) {
|
||||
|
|
|
@ -67,7 +67,6 @@ void AssFixStylesFilter::ProcessSubs(AssFile *subs, wxWindow *export_dialog) {
|
|||
wxArrayString styles = subs->GetStyles();
|
||||
std::for_each(styles.begin(), styles.end(), std::mem_fun_ref(&wxString::MakeLower));
|
||||
styles.Sort();
|
||||
size_t n = styles.Count();
|
||||
|
||||
for (entryIter cur=subs->Line.begin();cur!=subs->Line.end();cur++) {
|
||||
AssDialogue *diag = dynamic_cast<AssDialogue*>(*cur);
|
||||
|
|
|
@ -252,8 +252,6 @@ int AssTransformFramerateFilter::ConvertTime(int time) {
|
|||
int newEnd = Input->TimeAtFrame(frame + 1);
|
||||
int newDur = newEnd - newStart;
|
||||
|
||||
int dongs = Input->FrameAtTime(newStart + newDur * dist, agi::vfr::END);
|
||||
|
||||
return newStart + newDur * dist;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,10 +61,10 @@
|
|||
///
|
||||
SubtitlesPreview::SubtitlesPreview(wxWindow *parent,int id,wxPoint pos,wxSize size,int winStyle,wxColour col)
|
||||
: wxWindow(parent,id,pos,size,winStyle)
|
||||
, style(new AssStyle)
|
||||
, backColour(col)
|
||||
, subFile(new AssFile)
|
||||
, line(new AssDialogue)
|
||||
, style(new AssStyle)
|
||||
{
|
||||
line->Text = "{\\q2}preview";
|
||||
|
||||
|
|
|
@ -54,12 +54,13 @@
|
|||
/// @param filename The filename to open
|
||||
YUV4MPEGVideoProvider::YUV4MPEGVideoProvider(wxString fname)
|
||||
: sf(NULL)
|
||||
, inited(false)
|
||||
, w (0)
|
||||
, h (0)
|
||||
, num_frames(-1)
|
||||
, cur_fn(-1)
|
||||
, pixfmt(Y4M_PIXFMT_NONE)
|
||||
, imode(Y4M_ILACE_NOTSET)
|
||||
, num_frames(-1)
|
||||
{
|
||||
fps_rat.num = -1;
|
||||
fps_rat.den = 1;
|
||||
|
|
Loading…
Reference in a new issue