Tk Source Code

Check-in [96115bb3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Silence compiler warning
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | revised_text | tip-466
Files: files | file ages | folders
SHA1: 96115bb33cc2befb4712a464cc3346387205f5f8
User & Date: fvogel 2017-02-21 22:53:52
References
2017-02-22
23:13 Ticket [0819cc40] revised_text: Patches to build on Windows and Linux status still Open with 3 other changes artifact: 653c5849 user: fvogel
Context
2017-02-22
23:08
[0819cc4018]: Patch from Paul Obermeier to make the branch build check-in: 2f3be9a6 user: fvogel tags: revised_text_ober, tip-466
16:56
When building on Windows, inline is already defined in makefile.vc (-Dinline=__inline) regardless of the compiler version check-in: 8e67d858 user: fvogel tags: revised_text, tip-466
2017-02-21
22:53
Silence compiler warning check-in: 96115bb3 user: fvogel tags: revised_text, tip-466
19:20
Fix [710f7fd44b]: Missing dependency in win/Makefile.in check-in: 21c86cec user: fvogel tags: revised_text, tip-466
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkBitField.c.

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
LsbIndex(uint32_t x)
{
    /* Source: http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightLinear */
    static const unsigned MultiplyDeBruijnBitPosition[32] = {
	 0,  1, 28,  2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17,  4, 8,
	31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18,  6, 11,  5, 10, 9
    };
    return MultiplyDeBruijnBitPosition[((uint32_t) ((x & -x)*0x077cb531)) >> 27];
}
#  else
/* The "classical" method, but about 20% slower than the DeBruijn method on my system. */
static unsigned
LsbIndex(uint32_t x)
{
    unsigned ctz = 32;







|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
LsbIndex(uint32_t x)
{
    /* Source: http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightLinear */
    static const unsigned MultiplyDeBruijnBitPosition[32] = {
	 0,  1, 28,  2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17,  4, 8,
	31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18,  6, 11,  5, 10, 9
    };
    return MultiplyDeBruijnBitPosition[((uint32_t) ((x & -((int32_t) x))*0x077cb531)) >> 27];
}
#  else
/* The "classical" method, but about 20% slower than the DeBruijn method on my system. */
static unsigned
LsbIndex(uint32_t x)
{
    unsigned ctz = 32;