Bug 4036 - Use proper enum values for uninitialized states
Summary: Use proper enum values for uninitialized states
Status: NEW
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.17.0
Hardware: PC Linux
: P3 enhancement
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2018-06-11 13:44 UTC by Avinash Sonawane
Modified: 2018-09-12 12:16 UTC (History)
0 users

See Also:


Attachments
Patch to use proper enum values for uninitialized states (5.21 KB, patch)
2018-06-11 13:44 UTC, Avinash Sonawane
no flags Details | Diff

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

Note You need to log in before you can comment on or make changes to this bug.