Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc 10.3.0 compatibility #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions compressedcuts.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <algorithm>
#include <sstream>
#include <cmath>
#include <getopt.h>

using namespace std;

Expand Down Expand Up @@ -1103,14 +1104,14 @@ void NodeStats(node *curr_node)

if (curr_node->problematic == 1 && curr_node->classifier.size() > TOO_MUCH)
{
printf("Error: This problematic node has %d rules!\n",curr_node->classifier.size());
printf("Error: This problematic node has %zu rules!\n",curr_node->classifier.size());
exit(1);
}

if (Num_Partitions != curr_node->children.size()
&& curr_node->children.size() != 0 && compressionON == 0)
{
printf("Error: num children != partitions!(%d != %d)\n",curr_node->children.size(),Num_Partitions);
printf("Error: num children != partitions!(%zu != %d)\n",curr_node->children.size(),Num_Partitions);
exit(1);
}

Expand Down Expand Up @@ -1487,7 +1488,7 @@ list<node*> nodeMerging(node * curr_node) {
}
}
if (num > curr_node->children.size()) {
printf("Odd: Of %d children, %d were identical\n",newlist.size(),num);
printf("Odd: Of %zu children, %d were identical\n",newlist.size(),num);
}
return newlist;
}
Expand Down Expand Up @@ -1540,7 +1541,7 @@ void regionCompaction(node * curr_node) {
void create_tree(list <pc_rule*> p_classifier)
{

printf("Incoming No of Rules in this tree = %d\n",p_classifier.size());
printf("Incoming No of Rules in this tree = %zu\n",p_classifier.size());

list <node*> worklist;

Expand Down Expand Up @@ -1685,7 +1686,7 @@ void create_tree(list <pc_rule*> p_classifier)
(*item)->boundary.field[4].low == curr_node->boundary.field[4].low && (*item)->boundary.field[4].high == curr_node->boundary.field[4].high &&
(*item)->classifier.size() == curr_node->classifier.size())
{
printf("Warning: parent and child are identical with %d rules!\n",curr_node->classifier.size());
printf("Warning: parent and child are identical with %zu rules!\n",curr_node->classifier.size());
(*item)->problematic = 1;
NodeStats(*item);
ClearMem(*item);
Expand Down Expand Up @@ -2365,13 +2366,13 @@ void BinPack(int bins,list <TreeStat*> Statistics)

}

int ComputeCutoffs()
void ComputeCutoffs()
{
if (binningON == 0)
{
Cutoffs[0] = numrules;
Num_Junk = 1;
return 0;
return;
}
for (int i = 0;i < NUM_JUNK;i++)
{
Expand Down