Bug 4036

Summary: Use proper enum values for uninitialized states
Product: Claws Mail (GTK 2) Reporter: Avinash Sonawane <rootkea>
Component: OtherAssignee: users
Status: NEW ---    
Severity: enhancement    
Priority: P3    
Version: 3.17.0   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch to use proper enum values for uninitialized states none

Description Avinash Sonawane 2018-06-11 13:44:45 UTC
Created attachment 1882 [details]
Patch to use proper enum values for uninitialized states

Hello!

Please find the attached patch which aims to use proper enum values instead of -1 for uninitialized states.

Since the type of enum is implementation defined[0] and can be unsigned int, storing or comparing with -1 in 0-based enum is troublesome.

Please let me know if anything needs to be fixed/amended.

Thanks!

[0] http://port70.net/~nsz/c/c11/n1570.html#6.7.2.2p4

Regards,
Avinash Sonawane (rootKea)
PICT, Pune
https://rootkea.wordpress.com