79168850

Date: 2024-11-08 04:57:39
Score: 1
Natty:
Report link

From comment by Jonathan Leffler:

Use unsigned char for the front and rear indexes — that will avoid the warning safely.

Nailed it. Built all the way through that time.

// FIFO queue structure for tracking the keys
typedef struct {
    char items[6];
    unsigned char front;
    unsigned char rear; 
} Queue;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: StarSword