Inconsistent typing of variable dirmode

Bug #1054397 reported by Michael Tautschnig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
igraph
Fix Released
High
Tamás Nepusz

Bug Description

Hi,

While compiling your package using our research compiler infrastructure it became apparent that the variable "dirmode" in structural_properties.c, function igraph_diameter, wrongly is of type igraph_integer_t, when it should be of type igraph_neimode_t instead.

As igraph_integer_t is a typedef name for double, the conversion to and from an enum may have surprising results.

Best,
Michael

Revision history for this message
Tamás Nepusz (ntamas) wrote :

Thanks - I cannot imagine how this could have slipped through the cracks such a long time ago (the functions involved have been added to igraph pretty early). I will fix this ASAP.

Note that several other functions are also affected in structural_properties.c (search for "dirmode" to find the remaining occurrences), but this is not a problem from igraph 0.6 onwards, where igraph_integer_t has finally been typedef'd to long int.

Changed in igraph:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Tamás Nepusz (ntamas)
Revision history for this message
Tamás Nepusz (ntamas) wrote :

Fixed in #2992 in trunk, #2957 in 0.6-main

Changed in igraph:
status: In Progress → Fix Committed
milestone: none → 0.6.1
Changed in igraph:
status: Fix Committed → Fix Released
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote : Continue on github

The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https://github.com/igraph/igraph/issues/121

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.