Menu

#392 Misleading compiler warning if SOA_SUPPORT disabled

3.0.0.0
closed
2345 (2)
2023-09-20
2022-04-19
No

If compiling the trdp stack with disabled SOA_SUPPORT, tau_so_if.c (line 44- 53) generates a warning. This warning shall only appear when the SOA_SUPPORT is enabled.

Currrently:

#ifndef SOA_SUPPORT
#if (defined WIN32 || defined WIN64)
#pragma WARNING("The service-oriented API and utility functions are preliminary and definitely not final! Use at your own risk!")
#pragma WARNING("Set compiler option SOA_SUPPORT=1 to enable serviceId filtering in libtrdp.")
#else
#warning \
    "The service-oriented API and utility functions are preliminary and definitely not final! Use at your own risk!"
#warning "Set compiler option SOA_SUPPORT=1 to enable serviceId filtering in libtrdp."
#endif
#endif

Suggested fix:

#ifdef SOA_SUPPORT
#if (defined WIN32 || defined WIN64)
#pragma WARNING("The service-oriented API and utility functions are preliminary and definitely not final! Use at your own risk!")
#pragma WARNING("Set compiler option SOA_SUPPORT=0 to disable serviceId filtering in libtrdp.")
#else
#warning \
    "The service-oriented API and utility functions are preliminary and definitely not final! Use at your own risk!"
#warning "Set compiler option SOA_SUPPORT=0 to disable serviceId filtering in libtrdp."
#endif
#endif

Discussion

  • Christoph Felser

    Please reject this issue. The warning is correct...

     
  • Armin-Hagen Weiss

    • Milestone: 2.0.3.0 --> 2.2.0.0
     
  • Armin-Hagen Weiss

    • status: open --> accepted
    • assigned_to: Chris Wetzler
     
  • Armin-Hagen Weiss

    • labels: --> 2345
    • status: accepted --> closed
     
  • Armin-Hagen Weiss

    • summary: Missleading compiler warning if SOA_SUPPORT disbaled --> Misleading compiler warning if SOA_SUPPORT disabled
     

Log in to post a comment.

MongoDB Logo MongoDB