mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
subparse: fix build with GCC 4.6.3
gstsubparse.c: In function ‘parse_subrip’: gstsubparse.c:988:7: error: ignoring return value of ‘strtol’, declared with attribute warn_unused_result [-Werror=unused-result] cc1: all warnings being treated as errors https://bugzilla.gnome.org/show_bug.cgi?id=765042
This commit is contained in:
parent
62655029c8
commit
d1ecd3cfa7
1 changed files with 8 additions and 2 deletions
|
@ -982,11 +982,17 @@ parse_subrip (ParserState * state, const gchar * line)
|
||||||
switch (state->state) {
|
switch (state->state) {
|
||||||
case 0:{
|
case 0:{
|
||||||
char *endptr;
|
char *endptr;
|
||||||
|
guint64 id;
|
||||||
|
|
||||||
/* looking for a single integer as a Cue ID, but we
|
/* looking for a single integer as a Cue ID, but we
|
||||||
* don't actually use it */
|
* don't actually use it */
|
||||||
(void) strtol (line, &endptr, 10);
|
errno = 0;
|
||||||
if (endptr != line && *endptr == '\0')
|
id = g_ascii_strtoull (line, &endptr, 10);
|
||||||
|
if (id == G_MAXUINT64 && errno == ERANGE)
|
||||||
|
state->state = 1;
|
||||||
|
else if (id == 0 && errno == EINVAL)
|
||||||
|
state->state = 1;
|
||||||
|
else if (endptr != line && *endptr == '\0')
|
||||||
state->state = 1;
|
state->state = 1;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue