Skip to content

pygco warnings #13

@salamb

Description

@salamb

Below are warnings from building the pygco fork being used. These warnings seem to be from gco itself, though this repo has the latest version gco v3.0 as part of its repo.

GCoptimization.cpp:31:23: warning: 'GCO_CLOCKS_PER_SEC' initialized and declared 'extern' [enabled by default]
extern "C" gcoclock_t GCO_CLOCKS_PER_SEC = CLOCKS_PER_SEC;
^
In file included from GCoptimization.h:109:0,
from GCoptimization.cpp:4:
graph.cpp: In instantiation of 'Graph<captype, tcaptype, flowtype>::Graph(int, int, void ()(char)) [with captype = int; tcaptype = int; flowtype = long long int]':
energy.h:187:189: required from 'Energy<captype, tcaptype, flowtype>::Energy(int, int, void ()(char)) [with captype = int; tcaptype = int; flowtype = long long int]'
GCoptimization.cpp:1230:33: required from here
graph.cpp:21:83: warning: deprecated conversion from string constant to 'char_' [-Wwrite-strings]
if (!nodes || !arcs) { if (error_function) (error_function)("Not enough memory!"); exit(1); }
^
In file included from GCoptimization.h:110:0,
from GCoptimization.cpp:4:
maxflow.cpp: In instantiation of 'flowtype Graph<captype, tcaptype, flowtype>::maxflow(bool, Block
) [with captype = int; tcaptype = int; flowtype = long long int]':
energy.h:325:33: required from 'Energy<captype, tcaptype, flowtype>::TotalValue Energy<captype, tcaptype, flowtype>::minimize() [with captype = int; tcaptype = int; flowtype = long long int; Energy<captype, tcaptype, flowtype>::TotalValue = long long int]'
GCoptimization.cpp:1237:37: required from here
maxflow.cpp:484:145: warning: deprecated conversion from string constant to 'char_' [-Wwrite-strings]
if (maxflow_iteration == 0 && reuse_trees) { if (error_function) (error_function)("reuse_trees cannot be used in the first call to maxflow()!"); exit(1); }
^
maxflow.cpp:485:126: warning: deprecated conversion from string constant to 'char
' [-Wwrite-strings]
if (changed_list && !reuse_trees) { if (error_function) (error_function)("changed_list cannot be used without reuse_trees!"); exit(1); }
^
In file included from GCoptimization.h:109:0,
from GCoptimization.cpp:4:
graph.cpp: In instantiation of 'void Graph<captype, tcaptype, flowtype>::reallocate_arcs() [with captype = int; tcaptype = int; flowtype = long long int]':
graph.h:408:43: required from 'void Graph<captype, tcaptype, flowtype>::add_edge(Graph<captype, tcaptype, flowtype>::node_id, Graph<captype, tcaptype, flowtype>::node_id, captype, captype) [with captype = int; tcaptype = int; flowtype = long long int; Graph<captype, tcaptype, flowtype>::node_id = int]'
energy.h:237:3: required from 'void Energy<captype, tcaptype, flowtype>::add_term2(Energy<captype, tcaptype, flowtype>::Var, Energy<captype, tcaptype, flowtype>::Var, Energy<captype, tcaptype, flowtype>::Value, Energy<captype, tcaptype, flowtype>::Value, Energy<captype, tcaptype, flowtype>::Value, Energy<captype, tcaptype, flowtype>::Value) [with captype = int; tcaptype = int; flowtype = long long int; Energy<captype, tcaptype, flowtype>::Var = int; Energy<captype, tcaptype, flowtype>::Value = int]'
GCoptimization.cpp:304:42: required from here
graph.cpp:94:73: warning: deprecated conversion from string constant to 'char
' [-Wwrite-strings]
if (!arcs) { if (error_function) (error_function)("Not enough memory!"); exit(1); }
^
graph.cpp: In instantiation of 'void Graph<captype, tcaptype, flowtype>::reallocate_nodes(int) [with captype = int; tcaptype = int; flowtype = long long int]':
graph.h:364:54: required from 'Graph<captype, tcaptype, flowtype>::node_id Graph<captype, tcaptype, flowtype>::add_node(int) [with captype = int; tcaptype = int; flowtype = long long int; Graph<captype, tcaptype, flowtype>::node_id = int]'
energy.h:198:30: required from 'Energy<captype, tcaptype, flowtype>::Var Energy<captype, tcaptype, flowtype>::add_variable(int) [with captype = int; tcaptype = int; flowtype = long long int; Energy<captype, tcaptype, flowtype>::Var = int]'
GCoptimization.cpp:1140:31: required from here
graph.cpp:70:74: warning: deprecated conversion from string constant to 'char
' [-Wwrite-strings]
if (!nodes) { if (error_function) (error_function)("Not enough memory!"); exit(1); }
^
In file included from graph.h:43:0,
from energy.h:77,
from GCoptimization.h:108,
from GCoptimization.cpp:4:
block.h: In instantiation of 'Type
Block::New(int) [with Type = int]':
maxflow.cpp:110:36: required from 'void Graph<captype, tcaptype, flowtype>::add_to_changed_list(Graph<captype, tcaptype, flowtype>::node_) [with captype = int; tcaptype = int; flowtype = long long int]'
maxflow.cpp:520:27: required from 'flowtype Graph<captype, tcaptype, flowtype>::maxflow(bool, Block) [with captype = int; tcaptype = int; flowtype = long long int]'
energy.h:325:33: required from 'Energy<captype, tcaptype, flowtype>::TotalValue Energy<captype, tcaptype, flowtype>::minimize() [with captype = int; tcaptype = int; flowtype = long long int; Energy<captype, tcaptype, flowtype>::TotalValue = long long int]'
GCoptimization.cpp:1237:37: required from here
block.h:124:76: warning: deprecated conversion from string constant to 'char
' [-Wwrite-strings]
if (!next) { if (error_function) (error_function)("Not enough memory!"); exit(1); }
^
block.h: In instantiation of 'Type* DBlock::New() [with Type = Graph<int, int, long long int>::nodeptr]':
maxflow.cpp:95:5: required from 'void Graph<captype, tcaptype, flowtype>::set_orphan_rear(Graph<captype, tcaptype, flowtype>::node
) [with captype = int; tcaptype = int; flowtype = long long int]'
maxflow.cpp:183:36: required from 'void Graph<captype, tcaptype, flowtype>::maxflow_reuse_trees_init() [with captype = int; tcaptype = int; flowtype = long long int]'
maxflow.cpp:487:44: required from 'flowtype Graph<captype, tcaptype, flowtype>::maxflow(bool, Block) [with captype = int; tcaptype = int; flowtype = long long int]'
energy.h:325:33: required from 'Energy<captype, tcaptype, flowtype>::TotalValue Energy<captype, tcaptype, flowtype>::minimize() [with captype = int; tcaptype = int; flowtype = long long int; Energy<captype, tcaptype, flowtype>::TotalValue = long long int]'
GCoptimization.cpp:1237:37: required from here
block.h:223:76: warning: deprecated conversion from string constant to 'char
' [-Wwrite-strings]
if (!first) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions