Casts in enum expressions make the converter fail an assertion
$subject, a test case (both a simple one and the full-blown one that triggered it in the user case) exists in https://github.com/mstorsjo/c99-to-c89/commit/enum-cast.
Any progress on resolving this issue? I'm having problems with this as well and would appreciate a response. Thanks!
I face this issue while compiling ffmpeg qsv module:
qsv.c
Assertion failed: cache2.n[0] == 2, file convert.c, line 546
I can workaround this by replacing MFX_MAKEFOURCC define with actual values:
#define MFX_MAKEFOURCC(A,B,C,D) ((((int)A))+(((int)B)<<8)+(((int)C)<<16)+(((int)D)<<24))
MFX_FOURCC_YV12 = MFX_MAKEFOURCC('Y','V','1','2'),
Thank @lieff show me the way to modify mfxcommon.h:
#define MFX_MAKEFOURCC(A,B,C,D) (((D*256+C)*256+B)*256+A)
That passed the c99-to-c89 converter!
Glad to hear!