I keep missing these because a super-module using the mnemon library
has more warning flags enabled than mnemon itself has.
static void
category_fini (category_t *category)
{
static void
category_fini (category_t *category)
{
for (i = 0; i < category->num_items; i++)
item_fini (&category->items[i]);
for (i = 0; i < category->num_items; i++)
item_fini (&category->items[i]);
static item_t *
category_next_bin_zero_item (category_t *category)
{
static item_t *
category_next_bin_zero_item (category_t *category)
{
- int *i = &category->bin_zero_head;
+ unsigned int *i = &category->bin_zero_head;
for ( ; *i < category->num_items; *i = *i + 1)
if (category->items[*i].score == 0)
for ( ; *i < category->num_items; *i = *i + 1)
if (category->items[*i].score == 0)
category_print (category_t *category,
FILE *file)
{
category_print (category_t *category,
FILE *file)
{
item_t *item;
fprintf (file, "order = %s\n\n",
item_t *item;
fprintf (file, "order = %s\n\n",
bin_item_index (bin_t *bin,
item_t *item)
{
bin_item_index (bin_t *bin,
item_t *item)
{
for (i = 0; i < bin->num_items; i++)
if (bin->items[i] == item)
for (i = 0; i < bin->num_items; i++)
if (bin->items[i] == item)
typedef struct _bin {
int score;
typedef struct _bin {
int score;
- int items_size;
- int num_items;
+ unsigned int items_size;
+ unsigned int num_items;
typedef struct _category {
char *name;
typedef struct _category {
char *name;
- int items_size;
- int num_items;
+ unsigned int items_size;
+ unsigned int num_items;
item_t *items;
/* Support sequential introduction of items from bin 0 */
category_order_t order;
/* Support categories where responses are timed (0.0 == disable). */
double time_limit;
item_t *items;
/* Support sequential introduction of items from bin 0 */
category_order_t order;
/* Support categories where responses are timed (0.0 == disable). */
double time_limit;
+ unsigned int bin_zero_head;
/* Support challenges of non-text types (image, audio, etc.) */
char *challenge_type;
/* Whether to repeat afterwards (for a little extra reinforcement) */
/* Support challenges of non-text types (image, audio, etc.) */
char *challenge_type;
/* Whether to repeat afterwards (for a little extra reinforcement) */
typedef struct _mnemon {
char *dir_name;
typedef struct _mnemon {
char *dir_name;
- int categories_size;
- int num_categories;
+ unsigned int categories_size;
+ unsigned int num_categories;
- int bins_size;
- int num_bins;
+ unsigned int bins_size;
+ unsigned int num_bins;