GCC warns that the output of our call to 'snprintf' in 'w8001_connect' may be truncated since both 'serio->phys' and 'w8001->phys' are 32 bytes in length. Increase the amount of space allocated for the latter to compensate.
Unified · Split
| @@ -27,6 +27,8 @@ MODULE_AUTHOR("Jaya Kumar <jayakumar.lkml@gmail.com>"); · 26 unmodified lines | ||
| 27 | 27 | MODULE_DESCRIPTION(DRIVER_DESC); |
| 28 | 28 | MODULE_LICENSE("GPL"); |
| 29 | 29 | |
| 30 | +#define W8001_MAX_PHYS 42 | |
| 31 | + | |
| 30 | 32 | #define W8001_MAX_LENGTH 13 |
| 31 | 33 | #define W8001_LEAD_MASK 0x80 |
| 32 | 34 | #define W8001_LEAD_BYTE 0x80 |
| @@ -89,7 +91,7 @@ struct w8001 { · 56 unmodified lines | ||
| 89 | 91 | unsigned char response_type; |
| 90 | 92 | unsigned char response[W8001_MAX_LENGTH]; |
| 91 | 93 | unsigned char data[W8001_MAX_LENGTH]; |
| 92 | − char phys[32]; | |
| 94 | + char phys[W8001_MAX_PHYS]; | |
| 93 | 95 | int type; |
| 94 | 96 | unsigned int pktlen; |
| 95 | 97 | u16 max_touch_x; |