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 | MODULE_DESCRIPTION(DRIVER_DESC); | 27 | MODULE_DESCRIPTION(DRIVER_DESC); |
| 28 | MODULE_LICENSE("GPL"); | 28 | MODULE_LICENSE("GPL"); |
| 29 | 29 | ||
| 30 | #define W8001_MAX_PHYS 42 | ||
| 31 | |||
| 30 | #define W8001_MAX_LENGTH 13 | 32 | #define W8001_MAX_LENGTH 13 |
| 31 | #define W8001_LEAD_MASK 0x80 | 33 | #define W8001_LEAD_MASK 0x80 |
| 32 | #define W8001_LEAD_BYTE 0x80 | 34 | #define W8001_LEAD_BYTE 0x80 |
| @@ -89,7 +91,7 @@ struct w8001 { · 56 unmodified lines | |||
| 89 | unsigned char response_type; | 91 | unsigned char response_type; |
| 90 | unsigned char response[W8001_MAX_LENGTH]; | 92 | unsigned char response[W8001_MAX_LENGTH]; |
| 91 | unsigned char data[W8001_MAX_LENGTH]; | 93 | unsigned char data[W8001_MAX_LENGTH]; |
| 92 | char phys[32]; | 94 | char phys[W8001_MAX_PHYS]; |
| 93 | int type; | 95 | int type; |
| 94 | unsigned int pktlen; | 96 | unsigned int pktlen; |
| 95 | u16 max_touch_x; | 97 | u16 max_touch_x; |