Warnings when assembling with NASM 2.15

Issue #559 resolved
Former user created an issue

There are lots of warnings if building x265 with NASM 2.15. This needs a fix similar to the one on x264: https://code.videolan.org/videolan/x264/-/commit/d78c1e83a1a9d34857eb53294282b3fbca3aba18

Warnings sample:

/Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:548: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1848: warning: dropping trailing empty parameter in call to multi-line macroDEFINE_ARGS_INTERNAL' [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:550: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1848: warning: improperly calling multi-line macroSETUP_STACK_POINTER' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:545: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1848: warning: improperly calling multi-line macroALLOC_STACK' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:548: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1848: warning: dropping trailing empty parameter in call to multi-line macroDEFINE_ARGS_INTERNAL' [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:550: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1849: warning: improperly calling multi-line macroSETUP_STACK_POINTER' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:545: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1849: warning: improperly calling multi-line macroALLOC_STACK' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:548: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1849: warning: dropping trailing empty parameter in call to multi-line macroDEFINE_ARGS_INTERNAL' [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:550: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1850: warning: improperly calling multi-line macroSETUP_STACK_POINTER' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:545: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1850: warning: improperly calling multi-line macroALLOC_STACK' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:548: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1850: warning: dropping trailing empty parameter in call to multi-line macroDEFINE_ARGS_INTERNAL' [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:550: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1850: warning: improperly calling multi-line macroSETUP_STACK_POINTER' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:545: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1850: warning: improperly calling multi-line macroALLOC_STACK' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:548: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1850: warning: dropping trailing empty parameter in call to multi-line macroDEFINE_ARGS_INTERNAL' [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:550: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1851: warning: improperly calling multi-line macroSETUP_STACK_POINTER' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:545: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1851: warning: improperly calling multi-line macroALLOC_STACK' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:548: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1851: warning: dropping trailing empty parameter in call to multi-line macroDEFINE_ARGS_INTERNAL' [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:550: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1852: warning: improperly calling multi-line macroSETUP_STACK_POINTER' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:545: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1852: warning: improperly calling multi-line macroALLOC_STACK' with 0 parameters [-w+macro-params-legacy] /Volumes/Developer/x265/source/common/../common/x86/x86inc.asm:548: ... from macro PROLOGUE' defined here /Volumes/Developer/x265/source/common/x86/ssd-a.asm:1852: warning: dropping trailing empty parameter in call to multi-line macroDEFINE_ARGS_INTERNAL' [-w+macro-params-legacy]

Comments (3)

  1. Shaylen Reddy

    you can disable this warning for now

    go to line 560 in source/CMakeLists.txt

    change

    COMMAND ${NASM_EXECUTABLE} ARGS ${NASM_FLAGS} ${ASM_SRC} -o ${ASM}.${SUFFIX}
    

    to

    COMMAND ${NASM_EXECUTABLE} ARGS -w-macro-params-legacy ${NASM_FLAGS} ${ASM_SRC} -o ${ASM}.${SUFFIX}
    
  2. Mattias Wadman

    @Shaylen Reddy Thanks

    cmake … -DCMAKE_ASM_NASM_FLAGS=-w-macro-params-legacy

    seems to work for me

  3. Log in to comment