openhpi2 / Open-HPI

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
Other
3 stars 1 forks source link

gcc 4.7 compiler warning in infrastructure code #2554

Closed openhpi2 closed 8 years ago

openhpi2 commented 10 years ago

Many calls were deprecated starting in glib 2.31. This lead to many warnings during compilation. We could remove the [-Wdeprecated-declarations] directive in the Makefile or create wrappers so that the same calls could be handled differently. The attached file has the warnings that were produced when openhpi was compiled on RHEL 7 machine. Some of the deprecated calls are g_thread_create g_mutex_new g_mutex_free g_static_private_init and related calls g_static_rec_mutex_init and related calls g_async_queue_timed_pop g_cond_timed_wait g_cond_new g_cond_free g_static_mutex_init and related calls etc

Attachment: make_on_RHEL7_without_patch.txt

Reported by: dr_mohan

openhpi2 commented 10 years ago

We would like to checkin the patch for the 3.5.0 release. This patch still gives 3 warnings in the infrastructure area. Wrapper functions are added to switch based on the glib version to make old calls or new calls. The patch is attached. If this patch could be reviewed before Monday, Sep 22, 2014 that would be great.

1853_gcc_warnings_infrastructure.patch.txt

Original comment by: dr_mohan

openhpi2 commented 10 years ago

After incorporating Anton's comments.

Original comment by: dr_mohan

openhpi2 commented 10 years ago

1853_gcc_warnings_infrastructure_sep_22.patch.txt

Original comment by: dr_mohan

openhpi2 commented 10 years ago

Fixed with checkin #7592

Original comment by: dr_mohan