代码如下:
/*
Initializes a kd tree node with a set of features. The node is not
expanded, and no ordering is imposed on the features.
@param features an array of image features
@param n number of features
@return Returns an unexpanded kd-tree node.
*/
static struct kd_node* kd_node_init( struct feature* features, int n )
{
struct kd_node* kd_node;
kd_node = malloc( sizeof( struct kd_node ) );
memset( kd_node, 0, sizeof( struct kd_node ) );
kd_node->ki = -1;
kd_node->features = features;
kd_node->n = n;
return kd_node;
}
memset( kd_node, 0, sizeof( struct kd_node ) );一行提示Warning,应该如何修改?