Fix return value of write_vorbis() to unbreak with clang 15
This commit is contained in:
parent
d84f4876bc
commit
ef8bba0abb
|
@ -2,6 +2,7 @@ COMMENT= object-oriented interface to Ogg Vorbis information
|
|||
|
||||
MODULES= cpan
|
||||
DISTNAME = Ogg-Vorbis-Header-0.11
|
||||
REVISION = 0
|
||||
CATEGORIES= audio
|
||||
|
||||
# perl
|
||||
|
|
|
@ -10,3 +10,56 @@ Index: lib/Ogg/Vorbis/Header.pm
|
|||
INC => '-I/inc',
|
||||
AUTO_INCLUDE => '#include "inc/vcedit.h"',
|
||||
AUTO_INCLUDE => '#include "inc/vcedit.c"',
|
||||
@@ -476,14 +476,14 @@ int write_vorbis (SV *obj)
|
||||
if ((fd = fopen(inpath, "rb")) == NULL) {
|
||||
perror("Error opening file in Ogg::Vorbis::Header::write\n");
|
||||
free(outpath);
|
||||
- return &PL_sv_undef;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if ((fd2 = fopen(outpath, "w+b")) == NULL) {
|
||||
perror("Error opening temp file in Ogg::Vorbis::Header::write\n");
|
||||
fclose(fd);
|
||||
free(outpath);
|
||||
- return &PL_sv_undef;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Setup the state and comments structs */
|
||||
@@ -494,7 +494,7 @@ int write_vorbis (SV *obj)
|
||||
fclose(fd2);
|
||||
unlink(outpath);
|
||||
free(outpath);
|
||||
- return &PL_sv_undef;
|
||||
+ return 0;
|
||||
}
|
||||
vc = vcedit_comments(state);
|
||||
|
||||
@@ -526,7 +526,7 @@ int write_vorbis (SV *obj)
|
||||
vcedit_clear(state);
|
||||
unlink(outpath);
|
||||
free(outpath);
|
||||
- return &PL_sv_undef;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
fclose(fd);
|
||||
@@ -536,7 +536,7 @@ int write_vorbis (SV *obj)
|
||||
perror("Error copying tempfile in Ogg::Vorbis::Header::add_comment\n");
|
||||
unlink(outpath);
|
||||
free(outpath);
|
||||
- return &PL_sv_undef;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if ((fd2 = fopen(inpath, "wb")) == NULL) {
|
||||
@@ -544,7 +544,7 @@ int write_vorbis (SV *obj)
|
||||
fclose(fd);
|
||||
unlink(outpath);
|
||||
free(outpath);
|
||||
- return &PL_sv_undef;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
while ((bytes = fread(buffer, 1, BUFFSIZE, fd)) > 0)
|
||||
|
|
Loading…
Reference in New Issue