74310

Supress warning from gcc init_priority attribute

Question:

G++ is giving me warnings about init_priority attribute:

g++ -c -o src/core/ModuleManager.o -Wall -fPIC -imacros ./src/configs/config.hpp -O2 -I./src/include src/core/ModuleManager.cpp src/core/ModuleManager.cpp:27:29: warning: requested init_priority is reserved for internal use

Is there a way to supress this specific warning?

Answer1:

<blockquote>

Is there a way to supress this specific warning?

</blockquote>

Yes: don't use init_priority reserved for internal use (priority <= 100).

There is a <em>reason</em> it is reserved, and if you ignore the warning, you'll eventually have to debug a problem you will have hard time understanding.

Never lie to your compiler -- it will get you!

Recommend

  • Copy Password From DialogBox Message Using Imacros
  • Invoking iMacros script from another iMacros script
  • How to use Imacros to remove a part of element inspector?
  • SConscript in different directory to source files
  • Using Oozie ssh action with private key
  • Zend Framework: only index view renders 404 error when trying to access other views via /controller/
  • Integrating iMacros scripts into python
  • Automapper says Missing map from System.String to System.Char? But I see no Char property
  • GAE Cloud Endpoints API Explorer stopped working
  • Remove parenthesis and text in a file using Python
  • plot if col A has substring
  • How to compare results between C++ and MATLAB?
  • CGAL: How to efficiently calculate the area of facets of a polyhedron?
  • C++ Boost ptr_map serialization error
  • TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'
  • undefined reference error due to use of static variables [duplicate]
  • Opaque reference instead of PImpl. Is it possible?
  • OSX - always hide certain files
  • Thread 1: EXC_BAD_ACCESS (code =1 address = 0x0)
  • Compiling dlib on OS X
  • msbuild create itemgroup from property group
  • How solve “Qt: Untested Windows version 10.0 detected!”
  • Eloquent paginate function in Slim 3 project using twig
  • C: Incompatible pointer type initializing
  • How to determine if there are bytes available to be read from boost:asio:serial_port
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • Functions in global context
  • $wpdb not working in file of WordPress plugin
  • Meteor helpers not available in Angular template
  • Why is the timeout on a windows udp receive socket always 500ms longer than set by SO_RCVTIMEO?
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • Invalid access key error using credentials redeemed from an amazon open id token
  • Circular dependency while pushing http interceptor
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • Buffer size for converting unsigned long to string
  • Hits per day in Google Big Query
  • How to get Windows thread pool to call class member function?
  • Does armcc optimizes non-volatile variables with -O0?
  • UserPrincipal.Current returns apppool on IIS