On Sunday 17 March 2002 00:23, Melvin Smith wrote: > Makes ok, alignment warnings. Tests run ok. Most warnings are > from -Wpadded. I was able to eliminate 1 or 2 by rearranging > members in structs, but some are due to unions of different size > types. > > We can either turn off -Wpadded or manually pad the structs > by changing types or adding placeholders (yucky). This warning > is typically only useful if you are looking for something specific, > so unless there is a specific case, I say turn it off.
I agree. > > Ditching BOOLVAL in favor of UINTVAL might fix a couple as well. > Using char types might be a minor memory save, but I'm not sure > which platforms actually see it due to alignment. Until we want to add another one. In either case, UINTVAL is the wrong type. We'd want the natural word size, which I haven't figured out (beyond benchmarking) how to test for.) Leave it as a char, and turn off the warning. > > I cleared up the one warning from io_unix.c. > > Follows is a grep -v of the padding warnings leaving other interesting > stuff. > > packfile.c:123: warning: long int format, unsigned int arg (arg 5) > key.c:265: warning: cast increases required alignment of target type > key.c:291: warning: cast increases required alignment of target type > key.c:319: warning: cast increases required alignment of target type > key.c:389: warning: cast increases required alignment of target type > key.c:464: warning: cast increases required alignment of target type > jit.c:301: warning: cast increases required alignment of target type > jit.c:352: warning: cast increases required alignment of target type > jit.c:368: warning: cast increases required alignment of target type > jit.c:510: warning: cast increases required alignment of target type I *think* I'm stamping those out as soon as 0.0.4 is out. > embed.c:121: warning: passing arg 1 of `mem_sys_allocate' as unsigned due > to prototype > embed.c:122: warning: passing arg 3 of `read' as unsigned due to prototype > embed.c:149: warning: cast increases required alignment of target type Same as those. > misc.c:399: warning: format not a string literal, argument types not checked > misc.c:407: warning: format not a string literal, argument types not checked > misc.c:415: warning: format not a string literal, argument types not checked > misc.c:423: warning: format not a string literal, argument types not checked > misc.c:431: warning: format not a string literal, argument types not checked Nothing we can do about that. > io/io_unix.c:206: warning: comparison of unsigned expression >= 0 is always > true > encodings/singlebyte.c:49: warning: cast discards qualifiers from pointer > target type > encodings/singlebyte.c:57: warning: cast discards qualifiers from pointer > target type > encodings/utf8.c:113: warning: cast discards qualifiers from pointer target > type > encodings/utf8.c:125: warning: cast discards qualifiers from pointer target > type > encodings/utf16.c:87: warning: cast discards qualifiers from pointer target > type > encodings/utf16.c:112: warning: cast discards qualifiers from pointer > target type > encodings/utf32.c:54: warning: cast discards qualifiers from pointer target > type > encodings/utf32.c:62: warning: cast discards qualifiers from pointer target > type Is this solvable? -- Bryan C. Warnock [EMAIL PROTECTED]