• 2023-12-23 10:56 UTC+0100 Enrico Maria Giordano

    From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 10:59:41 2023
    2023-12-23 10:56 UTC+0100 Enrico Maria Giordano
    <e.m.giordano@emagsoftware.it>
    * contrib\hbhpdf\hpdf_shading.c
    ! moved declaration to allow compilation with BCC32 non-CLANG

    2023-12-23 10:46 UTC+0100 Enrico Maria Giordano
    <e.m.giordano@emagsoftware.it>
    * contrib\hbhpdf\hpdf_utils.c
    ! removed inline declaration to allow compilation with BCC32 non-CLANG

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 15:27:08 2023
    Il 23/12/2023 10:59, Enrico Maria Giordano ha scritto:

    2023-12-23 10:56 UTC+0100 Enrico Maria Giordano <e.m.giordano@emagsoftware.it>
      * contrib\hbhpdf\hpdf_shading.c
        ! moved declaration to allow compilation with BCC32 non-CLANG

    2023-12-23 10:46 UTC+0100 Enrico Maria Giordano <e.m.giordano@emagsoftware.it>
      * contrib\hbhpdf\hpdf_utils.c
        ! removed inline declaration to allow compilation with BCC32 non-CLANG

    Ok, now I get this with MSC32:

    contrib\hbhpdf\hpdf_utils.c(223): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data contrib\hbhpdf\hpdf_utils.c(238): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data

    What can I do to fix these warnings without touching the code?...

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 15:30:07 2023
    Il 23/12/2023 15:27, Enrico Maria Giordano ha scritto:

    Ok, now I get this with MSC32:

    contrib\hbhpdf\hpdf_utils.c(223): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data contrib\hbhpdf\hpdf_utils.c(238): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data

    What can I do to fix these warnings without touching the code?...

    This is the line 223:

    dig = modff(int_val/10.0, &int_val);

    The first argument (int_val/10.0) is of double type while modff() wants
    a float.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sat Dec 23 11:19:16 2023
    Enrico Maria Giordano wrote:
    Il 23/12/2023 10:59, Enrico Maria Giordano ha scritto:

    2023-12-23 10:56 UTC+0100 Enrico Maria Giordano <e.m.giordano@emagsoftware.it>
      * contrib\hbhpdf\hpdf_shading.c
        ! moved declaration to allow compilation with BCC32 non-CLANG

    2023-12-23 10:46 UTC+0100 Enrico Maria Giordano <e.m.giordano@emagsoftware.it>
      * contrib\hbhpdf\hpdf_utils.c
        ! removed inline declaration to allow compilation with BCC32 non-CLANG

    Ok, now I get this with MSC32:

    contrib\hbhpdf\hpdf_utils.c(223): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data contrib\hbhpdf\hpdf_utils.c(238): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data

    What can I do to fix these warnings without touching the code?...


    You can possibly disable warnings for hbhpdf (look at CCC_CMD) or better
    add CCC_CMD_NO_WARNINGS (in such case it will have to be added to
    makefile.(all other compilers).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 19:11:08 2023
    Il 23/12/2023 17:19, Ron Pinkas ha scritto:

    Ok, now I get this with MSC32:

    contrib\hbhpdf\hpdf_utils.c(223): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data
    contrib\hbhpdf\hpdf_utils.c(238): warning C4244: 'function': conversion
    from 'double' to 'float', possible loss of data

    What can I do to fix these warnings without touching the code?...

    You can possibly disable warnings for hbhpdf (look at CCC_CMD) or better
    add CCC_CMD_NO_WARNINGS (in such case it will have to be added to makefile.(all other compilers).

    I would prefer to exclude warning C4244 only for hpdf_utils.c. Is it
    possible?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 19:17:27 2023
    Il 23/12/2023 15:30, Enrico Maria Giordano ha scritto:

    Ok, now I get this with MSC32:

    contrib\hbhpdf\hpdf_utils.c(223): warning C4244: 'function':
    conversion from 'double' to 'float', possible loss of data
    contrib\hbhpdf\hpdf_utils.c(238): warning C4244: 'function':
    conversion from 'double' to 'float', possible loss of data

    What can I do to fix these warnings without touching the code?...

    This is the line 223:

    dig = modff(int_val/10.0, &int_val);

    The first argument (int_val/10.0) is of double type while modff() wants
    a float.

    For the moment I will fix the warnings, please don't yell at me. :-)

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 19:27:52 2023
    Il 23/12/2023 19:17, Enrico Maria Giordano ha scritto:

    The first argument (int_val/10.0) is of double type while modff()
    wants a float.

    For the moment I will fix the warnings, please don't yell at me. :-)

    I changed my mind. Too much warnings in other modules of harupdf. I have
    to disable the warnings only for harupdf. Can it be done? How exactly?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 19:40:48 2023
    Il 23/12/2023 17:19, Ron Pinkas ha scritto:

    What can I do to fix these warnings without touching the code?...

    You can possibly disable warnings for hbhpdf (look at CCC_CMD) or better
    add CCC_CMD_NO_WARNINGS (in such case it will have to be added to makefile.(all other compilers).

    CCC_CMD is for all the modules, not for a single module, isn't it? I did
    not understand your second suggestion (CCC_CMD_NO_WARNINGS), sorry.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 19:42:56 2023
    Il 23/12/2023 19:40, Enrico Maria Giordano ha scritto:

    CCC_CMD is for all the modules, not for a single module, isn't it? I did
    not understand your second suggestion (CCC_CMD_NO_WARNINGS), sorry.

    It seems (from the changelog) that Andi Jaha was my predecessor in
    fixing warnings. He always fixed contribs too. :-)

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 23:58:13 2023
    Il 23/12/2023 19:27, Enrico Maria Giordano ha scritto:

    The first argument (int_val/10.0) is of double type while modff()
    wants a float.

    For the moment I will fix the warnings, please don't yell at me. :-)

    I changed my mind. Too much warnings in other modules of harupdf. I have
    to disable the warnings only for harupdf. Can it be done? How exactly?

    Unfortunately I can't see any way other than fixing the warnings in
    contrib code. Tomorrow I will start doing it again.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sat Dec 23 20:14:11 2023
    Enrico Maria Giordano wrote:


    Il 23/12/2023 17:19, Ron Pinkas ha scritto:

    What can I do to fix these warnings without touching the code?...

    You can possibly disable warnings for hbhpdf (look at CCC_CMD) or better add CCC_CMD_NO_WARNINGS (in such case it will have to be added to makefile.(all other compilers).

    CCC_CMD is for all the modules, not for a single module, isn't it? I did
    not understand your second suggestion (CCC_CMD_NO_WARNINGS), sorry.


    Enrico,

    In compile.mak you can find the list of all modules for each lib. Look
    at lines 6107 to 6285 for the hbhpdf.lib and harupdf.lib. They are
    currently compiled with macro CCC_CMD you can change ALL of these to CCC_CMD_NOWARNING which is a NEW MACRO. Therefore you then need to
    define the new macro for each compiler in the makefile.vc, makefile.bc,
    etc. as a COPY from CCC_CMD plus additional swittch (or remove switch)
    to disable warnings.

    If you need more info send me an email so I can forward my WhatsApp
    number.

    This should be a simpler approach for compiling 3rd party code tthat has warnings that you do nott wish to see.

    Ron

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sat Dec 23 20:17:01 2023
    Enrico Maria Giordano wrote:


    Il 23/12/2023 19:27, Enrico Maria Giordano ha scritto:

    The first argument (int_val/10.0) is of double type while modff() wants a float.

    For the moment I will fix the warnings, please don't yell at me. :-)

    I changed my mind. Too much warnings in other modules of harupdf. I have
    to disable the warnings only for harupdf. Can it be done? How exactly?

    Unfortunately I can't see any way other than fixing the warnings in
    contrib code. Tomorrow I will start doing it again.


    Why? Warnings are not a show stopper, and can be ignored or silenced.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 10:19:13 2023
    Il 24/12/2023 02:17, Ron Pinkas ha scritto:

    Unfortunately I can't see any way other than fixing the warnings in
    contrib code. Tomorrow I will start doing it again.

    Why? Warnings are not a show stopper, and can be ignored or silenced.

    Yes, but then what is the purpose of showing warnings if not to be
    fixed? I don't understand. Anyway, ok, I received the message loud and
    clear: I quit to fix warnings, I will just try to silence them.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 10:21:48 2023
    Il 24/12/2023 10:19, Enrico Maria Giordano ha scritto:

    Yes, but then what is the purpose of showing warnings if not to be
    fixed? I don't understand. Anyway, ok, I received the message loud and
    clear: I quit to fix warnings, I will just try to silence them.

    But I will continue to fix the warnings in core xHarbour code, ok?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 10:16:33 2023
    Il 24/12/2023 02:14, Ron Pinkas ha scritto:

    CCC_CMD is for all the modules, not for a single module, isn't it? I did
    not understand your second suggestion (CCC_CMD_NO_WARNINGS), sorry.

    Enrico,

    In compile.mak you can find the list of all modules for each lib. Look
    at lines 6107 to 6285 for the hbhpdf.lib and harupdf.lib. They are
    currently compiled with macro CCC_CMD you can change ALL of these to CCC_CMD_NOWARNING which is a NEW MACRO. Therefore you then need to
    define the new macro for each compiler in the makefile.vc, makefile.bc,
    etc. as a COPY from CCC_CMD plus additional swittch (or remove switch)
    to disable warnings.

    Ok, I will study it, thank you!

    If you need more info send me an email so I can forward my WhatsApp
    number.

    Sorry, I don't have Whatsapp (I don't have a smartphone, two smartphones
    in a family are enough for me).

    This should be a simpler approach for compiling 3rd party code tthat has warnings that you do nott wish to see.

    Ok.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 11:26:34 2023
    Il 24/12/2023 02:14, Ron Pinkas ha scritto:

    In compile.mak you can find the list of all modules for each lib. Look
    at lines 6107 to 6285 for the hbhpdf.lib and harupdf.lib. They are
    currently compiled with macro CCC_CMD you can change ALL of these to CCC_CMD_NOWARNING which is a NEW MACRO. Therefore you then need to
    define the new macro for each compiler in the makefile.vc, makefile.bc,
    etc. as a COPY from CCC_CMD plus additional swittch (or remove switch)
    to disable warnings.

    Ok, I added two new macros

    CC_CMD_NOWARN
    CCC_CMD_NOWARN

    and silenced some MSC warnings. Now I get these errors:

    contrib\hbhpdf\hpdf_encoder.c(2225): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2225): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2242): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_BasicEncoderAttr'
    contrib\hbhpdf\hpdf_encoder.c(2242): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2534): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2534): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2567): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CMapEncoderAttr'
    contrib\hbhpdf\hpdf_encoder.c(2567): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2642): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2642): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2652): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2652): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2662): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2662): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2775): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2775): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2803): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2803): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast

    They can be fixed compiling in C mode. But I'm not sure how to force C
    mode for a single module. Do I have to create one more macro like

    CCC_CMD_HBHPDF =$(CC) -wd4244 $(CLIBFLAGS) -Fo$@ $**

    ? Please confirm.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 10:24:51 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 10:19, Enrico Maria Giordano ha scritto:

    Yes, but then what is the purpose of showing warnings if not to be
    fixed? I don't understand. Anyway, ok, I received the message loud and clear: I quit to fix warnings, I will just try to silence them.

    But I will continue to fix the warnings in core xHarbour code, ok?


    Of course I also want to fix all warnings and hat to see them. The only
    reason I warned you against fixing is specifically 3rd party code of
    LIVE projects.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 10:32:22 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 02:14, Ron Pinkas ha scritto:

    In compile.mak you can find the list of all modules for each lib. Look
    at lines 6107 to 6285 for the hbhpdf.lib and harupdf.lib. They are currently compiled with macro CCC_CMD you can change ALL of these to CCC_CMD_NOWARNING which is a NEW MACRO. Therefore you then need to
    define the new macro for each compiler in the makefile.vc, makefile.bc, etc. as a COPY from CCC_CMD plus additional swittch (or remove switch)
    to disable warnings.

    Ok, I added two new macros

    CC_CMD_NOWARN
    CCC_CMD_NOWARN

    and silenced some MSC warnings. Now I get these errors:

    contrib\hbhpdf\hpdf_encoder.c(2225): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2225): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2242): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_BasicEncoderAttr'
    contrib\hbhpdf\hpdf_encoder.c(2242): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2534): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2534): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2567): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CMapEncoderAttr'
    contrib\hbhpdf\hpdf_encoder.c(2567): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2642): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2642): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2652): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2652): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2662): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2662): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2775): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2775): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2803): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2803): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast

    They can be fixed compiling in C mode. But I'm not sure how to force C
    mode for a single module. Do I have to create one more macro like

    CCC_CMD_HBHPDF =$(CC) -wd4244 $(CLIBFLAGS) -Fo$@ $**

    ? Please confirm.


    Sorry I don't understand, The whole of hbhpd.libf (and harupdf.lib) is
    already compiling with MSVC in C mode, withOUT errors.

    If your CCC_CMD_NOWARN is based on CCC_CMD (which compiles withOUT error)
    just adding some warning silencing to it should compile without errors
    too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 16:40:56 2023
    Il 24/12/2023 16:24, Ron Pinkas ha scritto:

    But I will continue to fix the warnings in core xHarbour code, ok?

    Of course I also want to fix all warnings and hat to see them. The only reason I warned you against fixing is specifically 3rd party code of
    LIVE projects.

    Is there an easy way to find older (ie. not LIVE) 3rd party code? As an example, what do you think of this?

    contrib\hbmzip\unzip.c(1053): warning C4456: declaration of 'uL' hides
    previous local declaration

    Can I fix it or is still a LIVE code?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 16:43:13 2023
    Il 24/12/2023 16:32, Ron Pinkas ha scritto:

    Now I get these errors:

    contrib\hbhpdf\hpdf_encoder.c(2225): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2225): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2242): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_BasicEncoderAttr'
    contrib\hbhpdf\hpdf_encoder.c(2242): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2534): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2534): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2567): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CMapEncoderAttr'
    contrib\hbhpdf\hpdf_encoder.c(2567): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2642): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2642): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2652): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2652): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2662): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2662): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2775): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2775): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast
    contrib\hbhpdf\hpdf_encoder.c(2803): error C2440: '=': cannot convert
    from 'void *' to 'HPDF_CidRange_Rec *'
    contrib\hbhpdf\hpdf_encoder.c(2803): note: Conversion from 'void*' to
    pointer to non-'void' requires an explicit cast

    They can be fixed compiling in C mode. But I'm not sure how to force C
    mode for a single module. Do I have to create one more macro like

    CCC_CMD_HBHPDF =$(CC) -wd4244 $(CLIBFLAGS) -Fo$@ $**

    ? Please confirm.

    Sorry I don't understand, The whole of hbhpd.libf (and harupdf.lib) is already compiling with MSVC in C mode, withOUT errors.

    So why I get the errors above using MSC32?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 16:56:56 2023
    Il 24/12/2023 16:40, Enrico Maria Giordano ha scritto:

    Is there an easy way to find older (ie. not LIVE) 3rd party code? As an example, what do you think of this?

    contrib\hbmzip\unzip.c(1053): warning C4456: declaration of 'uL' hides previous local declaration

    Can I fix it or is still a LIVE code?

    It looks like a LIVE code:

    https://github.com/madler/zlib/blob/master/contrib/minizip/unzip.c

    So, do I have to create a new macro CCC_CMD_MZIP and add -wd4456 to it?
    Please confirm.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 10:59:23 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 16:24, Ron Pinkas ha scritto:

    But I will continue to fix the warnings in core xHarbour code, ok?

    Of course I also want to fix all warnings and hat to see them. The only reason I warned you against fixing is specifically 3rd party code of
    LIVE projects.

    Is there an easy way to find older (ie. not LIVE) 3rd party code? As an example, what do you think of this?

    contrib\hbmzip\unzip.c(1053): warning C4456: declaration of 'uL' hides previous local declaration

    Can I fix it or is still a LIVE code?


    Enrico,

    In the copyright notice of that source its clear its a 3rd pary code and
    it has this link:

    http://www.winimage.com/zLibDll/minizip.html

    It seems to be a live conttrib of zlib:

    https://github.com/madler/zlib/tree/master/contrib/minizip

    Ron

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 17:01:08 2023
    Il 24/12/2023 16:53, Ron Pinkas ha scritto:

    I would prefer to exclude warning C4244 only for hpdf_utils.c. Is it
    possible?

    And only for MSC.

    Yes. You can modify the MACRO used for just this source from CCC_CMD to
    new CCC_CMD_NOWARN (assuming CCC_CMD_NOWARN is copy of CCC_CMD with
    disable warning)

    But it would be a generic macro. Should I create one for each compiler? Otherwise the added switches would have used by all the compilers! Or am
    I wrong?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 11:02:54 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 16:40, Enrico Maria Giordano ha scritto:

    Is there an easy way to find older (ie. not LIVE) 3rd party code? As an example, what do you think of this?

    contrib\hbmzip\unzip.c(1053): warning C4456: declaration of 'uL' hides previous local declaration

    Can I fix it or is still a LIVE code?

    It looks like a LIVE code:

    https://github.com/madler/zlib/blob/master/contrib/minizip/unzip.c

    So, do I have to create a new macro CCC_CMD_MZIP and add -wd4456 to it? Please confirm.


    Enrico,

    It ssems too much work to create a project specific macro because it
    requires adding the macro definition to ALL other compilers. It seems
    easier to create a GNERIC CCC_CMD_NOWARN which you then use for the
    sources which produce warnings you wantt to silence.

    Ron

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 11:03:48 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 16:32, Ron Pinkas ha scritto:

    Now I get these errors:

    contrib\hbhpdf\hpdf_encoder.c(2225): error C2440: '=': cannot convert from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2225): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2242): error C2440: '=': cannot convert from 'void *' to 'HPDF_BasicEncoderAttr' contrib\hbhpdf\hpdf_encoder.c(2242): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2534): error C2440: '=': cannot convert from 'void *' to 'HPDF_Encoder'
    contrib\hbhpdf\hpdf_encoder.c(2534): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2567): error C2440: '=': cannot convert from 'void *' to 'HPDF_CMapEncoderAttr' contrib\hbhpdf\hpdf_encoder.c(2567): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2642): error C2440: '=': cannot convert from 'void *' to 'HPDF_CidRange_Rec *' contrib\hbhpdf\hpdf_encoder.c(2642): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2652): error C2440: '=': cannot convert from 'void *' to 'HPDF_CidRange_Rec *' contrib\hbhpdf\hpdf_encoder.c(2652): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2662): error C2440: '=': cannot convert from 'void *' to 'HPDF_CidRange_Rec *' contrib\hbhpdf\hpdf_encoder.c(2662): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2775): error C2440: '=': cannot convert from 'void *' to 'HPDF_CidRange_Rec *' contrib\hbhpdf\hpdf_encoder.c(2775): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast contrib\hbhpdf\hpdf_encoder.c(2803): error C2440: '=': cannot convert from 'void *' to 'HPDF_CidRange_Rec *' contrib\hbhpdf\hpdf_encoder.c(2803): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast

    They can be fixed compiling in C mode. But I'm not sure how to force C mode for a single module. Do I have to create one more macro like

    CCC_CMD_HBHPDF =$(CC) -wd4244 $(CLIBFLAGS) -Fo$@ $**

    ? Please confirm.

    Sorry I don't understand, The whole of hbhpd.libf (and harupdf.lib) is already compiling with MSVC in C mode, withOUT errors.

    So why I get the errors above using MSC32?


    What is MSC32?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 17:03:53 2023
    Il 24/12/2023 16:59, Ron Pinkas ha scritto:

    Can I fix it or is still a LIVE code?

    Enrico,

    In the copyright notice of that source its clear its a 3rd pary code and
    it has this link:

    http://www.winimage.com/zLibDll/minizip.html

    It seems to be a live conttrib of zlib:

    https://github.com/madler/zlib/tree/master/contrib/minizip

    Ok, but how to fix it then? I'm about to give up. This is the warning I
    wish to fix:

    contrib\hbmzip\unzip.c(1053): warning C4456: declaration of 'uL' hides
    previous local declaration

    I can create a new macro CCC_CMD_MZIP but it would be used by all the compilers. Surely I am missing something...

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 17:05:46 2023
    Il 24/12/2023 17:02, Ron Pinkas ha scritto:

    It ssems too much work to create a project specific macro because it
    requires adding the macro definition to ALL other compilers. It seems
    easier to create a GNERIC CCC_CMD_NOWARN which you then use for the
    sources which produce warnings you wantt to silence.

    Ok, understood. This is what I was missing: the new macro can be defined different in each makefile.*.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 17:07:56 2023
    Il 24/12/2023 17:03, Ron Pinkas ha scritto:

    What is MSC32?

    MSC32 = Microsoft C++ 32 bit
    MSC64 = Microsoft C++ 64 bit
    BCC32 = Embarcadero C++ 32 bit
    BCC64 = Embarcadero C++ 64 bit
    MGW32 = MinGW 32 bit
    MGW64 = MinGW 64 bit

    Those are the compilers that I have to make xHarbour builds.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 10:53:40 2023
    Enrico Maria Giordano wrote:


    Il 23/12/2023 19:11, Enrico Maria Giordano ha scritto:

    I would prefer to exclude warning C4244 only for hpdf_utils.c. Is it possible?

    And only for MSC.


    Yes. You can modify the MACRO used for just this source from CCC_CMD to
    new CCC_CMD_NOWARN (assuming CCC_CMD_NOWARN is copy of CCC_CMD with
    disable warning)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 13:24:05 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 17:03, Ron Pinkas ha scritto:

    What is MSC32?

    MSC32 = Microsoft C++ 32 bit
    MSC64 = Microsoft C++ 64 bit
    BCC32 = Embarcadero C++ 32 bit
    BCC64 = Embarcadero C++ 64 bit
    MGW32 = MinGW 32 bit
    MGW64 = MinGW 64 bit

    Those are the compilers that I have to make xHarbour builds.


    I meant WHICH version? I tested with VS 2022 using the auto detection
    - No user setting required, all auto configured.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 13:29:59 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 16:53, Ron Pinkas ha scritto:

    I would prefer to exclude warning C4244 only for hpdf_utils.c. Is it possible?

    And only for MSC.

    Yes. You can modify the MACRO used for just this source from CCC_CMD to
    new CCC_CMD_NOWARN (assuming CCC_CMD_NOWARN is copy of CCC_CMD with
    disable warning)

    But it would be a generic macro. Should I create one for each compiler? Otherwise the added switches would have used by all the compilers! Or am
    I wrong?


    Each makefile.bc/dc/gc/pc/vc/wc is where tthe MACRO is defined, so each compiler hass its own definition of tthe macros used by common?.mak

    The common make file set tthe generic "formula" and each compiler
    specific file provides the compiler specific setting for each generic
    MACRO.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Dec 24 13:31:03 2023
    Enrico Maria Giordano wrote:


    Il 24/12/2023 16:59, Ron Pinkas ha scritto:

    Can I fix it or is still a LIVE code?

    Enrico,

    In the copyright notice of that source its clear its a 3rd pary code and
    it has this link:

    http://www.winimage.com/zLibDll/minizip.html

    It seems to be a live conttrib of zlib:

    https://github.com/madler/zlib/tree/master/contrib/minizip

    Ok, but how to fix it then? I'm about to give up. This is the warning I
    wish to fix:

    contrib\hbmzip\unzip.c(1053): warning C4456: declaration of 'uL' hides previous local declaration

    I can create a new macro CCC_CMD_MZIP but it would be used by all the compilers. Surely I am missing something...


    I hope its now understood?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 19:44:38 2023
    Il 24/12/2023 19:24, Ron Pinkas ha scritto:

    What is MSC32?

    MSC32 = Microsoft C++ 32 bit
    MSC64 = Microsoft C++ 64 bit
    BCC32 = Embarcadero C++ 32 bit
    BCC64 = Embarcadero C++ 64 bit
    MGW32 = MinGW 32 bit
    MGW64 = MinGW 64 bit

    Those are the compilers that I have to make xHarbour builds.

    I meant WHICH version?

    2022

    I tested with VS 2022 using the auto detection
    - No user setting required, all auto configured.

    Great. I'm using -W4 warning level and I get warnings. No more. I'm
    about to commit the changes.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Dec 24 19:48:01 2023
    Il 24/12/2023 19:29, Ron Pinkas ha scritto:

    Each makefile.bc/dc/gc/pc/vc/wc is where tthe MACRO is defined, so each compiler hass its own definition of tthe macros used by common?.mak

    The common make file set tthe generic "formula" and each compiler
    specific file provides the compiler specific setting for each generic
    MACRO.

    Yes, already understood, thank you.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)