Opened 9 years ago

Closed 9 years ago

#4391 closed defect (fixed)

error in avisynth.c with mingw-w64

Reported by: jb_alvarado Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The new source stops compiling by:

In file included from libavformat/avisynth.c:33:0:
./compat/avisynth/avisynth_c.h:806:27: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 AVSC_INLINE AVS_Library * avs_load_library() {
                           ^
libavformat/avisynth.c:69:23: error: unknown type name 'avs_bits_per_pixel_func'
     AVSC_DECLARE_FUNC(avs_bits_per_pixel);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:70:23: error: unknown type name 'avs_get_height_p_func'
     AVSC_DECLARE_FUNC(avs_get_height_p);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:71:23: error: unknown type name 'avs_get_pitch_p_func'
     AVSC_DECLARE_FUNC(avs_get_pitch_p);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:72:23: error: unknown type name 'avs_get_read_ptr_p_func'
     AVSC_DECLARE_FUNC(avs_get_read_ptr_p);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:73:23: error: unknown type name 'avs_get_row_size_p_func'
     AVSC_DECLARE_FUNC(avs_get_row_size_p);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:74:23: error: unknown type name 'avs_is_yv24_func'
     AVSC_DECLARE_FUNC(avs_is_yv24);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:75:23: error: unknown type name 'avs_is_yv16_func'
     AVSC_DECLARE_FUNC(avs_is_yv16);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:76:23: error: unknown type name 'avs_is_yv411_func'
     AVSC_DECLARE_FUNC(avs_is_yv411);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c:77:23: error: unknown type name 'avs_is_y8_func'
     AVSC_DECLARE_FUNC(avs_is_y8);
                       ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
                                 ^
libavformat/avisynth.c: In function 'avisynth_load_library':
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:143:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_bits_per_pixel, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:144:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_get_height_p, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:145:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_get_pitch_p, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:146:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_get_read_ptr_p, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:147:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_get_row_size_p, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:148:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_is_yv24, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:149:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_is_yv16, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:150:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_is_yv411, 0);
     ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from pointer without a cast
         avs_library.name =                                             \
                          ^
libavformat/avisynth.c:151:5: note: in expansion of macro 'LOAD_AVS_FUNC'
     LOAD_AVS_FUNC(avs_is_y8, 0);
     ^
libavformat/avisynth.c: In function 'avisynth_read_packet_video':
libavformat/avisynth.c:463:9: error: called object is not a function or function pointer
     if (avs_library.avs_is_yv24(avs->vi))
         ^
libavformat/avisynth.c:465:14: error: called object is not a function or function pointer
     else if (avs_library.avs_is_yv16(avs->vi))
              ^
libavformat/avisynth.c:467:14: error: called object is not a function or function pointer
     else if (avs_library.avs_is_yv411(avs->vi))
              ^
libavformat/avisynth.c:469:14: error: called object is not a function or function pointer
     else if (avs_library.avs_is_y8(avs->vi))
              ^
libavformat/avisynth.c:472:16: error: called object is not a function or function pointer
         bits = avs_library.avs_bits_per_pixel(avs->vi);
                ^
libavformat/avisynth.c:505:17: error: called object is not a function or function pointer
         src_p = avs_library.avs_get_read_ptr_p(frame, plane);
                 ^
libavformat/avisynth.c:506:17: error: called object is not a function or function pointer
         pitch = avs_library.avs_get_pitch_p(frame, plane);
                 ^
libavformat/avisynth.c:512:27: error: called object is not a function or function pointer
             rowsize     = avs_library.avs_get_row_size_p(frame, plane);
                           ^
libavformat/avisynth.c:513:27: error: called object is not a function or function pointer
             planeheight = avs_library.avs_get_height_p(frame, plane);

Yesterday it was working. Build system is:
msys2, mingw-w64 32 and 64 bit, gcc 4.9.2

Change History (6)

comment:1 by jb_alvarado, 9 years ago

Component: undeterminedavformat
Version: unspecifiedgit-master

comment:2 by John Warburton, 9 years ago

You beat me to this one :-) Same here. Just reported it on dev mailing list.

comment:3 by RiCON, 9 years ago

Building with --enable-avisynth still broken as of commit 589a6042ea80a76c1c936d768a80eb66abd86a2f.

In file included from libavformat/avisynth.c:33:0:
./compat/avisynth/avisynth_c.h: In function 'avs_is_same_colorspace':
./compat/avisynth/avisynth_c.h:363:17: error: implicit declaration of function 'avs_is_yv12' [-Werror=implicit-function-declaration]
                 || (avs_is_yv12(x) && avs_is_yv12(y));
                 ^
./compat/avisynth/avisynth_c.h: In function 'avs_get_pitch':
./compat/avisynth/avisynth_c.h:404:9: error: implicit declaration of function 'avs_get_pitch_p' [-Werror=implicit-function-declaration]
         return avs_get_pitch_p(p, 0);}
         ^
./compat/avisynth/avisynth_c.h: In function 'avs_get_read_ptr':
./compat/avisynth/avisynth_c.h:419:9: error: implicit declaration of function 'avs_get_read_ptr_p' [-Werror=implicit-function-declaration]
         return avs_get_read_ptr_p(p, 0);}
         ^
./compat/avisynth/avisynth_c.h:419:9: warning: return makes pointer from integer without a cast
./compat/avisynth/avisynth_c.h: In function 'avs_get_write_ptr':
./compat/avisynth/avisynth_c.h:426:9: error: implicit declaration of function 'avs_get_write_ptr_p' [-Werror=implicit-function-declaration]
         return avs_get_write_ptr_p(p, 0);}
         ^
./compat/avisynth/avisynth_c.h:426:9: warning: return makes pointer from integer without a cast
./compat/avisynth/avisynth_c.h: At top level:
./compat/avisynth/avisynth_c.h:780:27: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 AVSC_INLINE AVS_Library * avs_load_library() {
                           ^
In file included from libavformat/avisynth.c:34:0:
./compat/avisynth/avisynth_c_25.h: In function 'avs_get_row_size_p_25':
./compat/avisynth/avisynth_c_25.h:51:31: error: 'AVS_FRAME_ALIGN' undeclared (first use in this function)
             r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; // Aligned rowsize
                               ^
./compat/avisynth/avisynth_c_25.h:51:31: note: each undeclared identifier is reported only once for each function it appears in
cc1.exe: some warnings being treated as errors
common.mak:57: recipe for target 'libavformat/avisynth.o' failed

comment:4 by RiCON, 9 years ago

As of 3a6df0b4bb588288fbf0f60081b20022a838ea79 almost fixed.

In file included from libavformat/avisynth.c:33:0:
./compat/avisynth/avisynth_c.h:788:27: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 AVSC_INLINE AVS_Library * avs_load_library() {
                           ^
In file included from libavformat/avisynth.c:34:0:
./compat/avisynth/avisynth_c_25.h: In function 'avs_get_row_size_p_25':
./compat/avisynth/avisynth_c_25.h:51:31: error: 'AVS_FRAME_ALIGN' undeclared (first use in this function)
             r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; // Aligned rowsize
                               ^
./compat/avisynth/avisynth_c_25.h:51:31: note: each undeclared identifier is reported only once for each function it appears in
common.mak:57: recipe for target 'libavformat/avisynth.o' failed

comment:5 by RiCON, 9 years ago

Successful compiling as of 9f91c5198f17569df98698318fd5945a6ab8b8d5.

in reply to:  5 comment:6 by Michael Niedermayer, 9 years ago

Resolution: fixed
Status: newclosed

Replying to RiCON:

Successful compiling as of 9f91c5198f17569df98698318fd5945a6ab8b8d5.

ok, closing ticket, exact commit fixing is unknown

Note: See TracTickets for help on using tickets.