unsigned char check_handle_break(struct dhdr FAR **pdev)
{
- unsigned char c;
+ unsigned char c = 0;
if (ctrl_break_pressed() ||
(c = (unsigned char)ndread(&syscon)) == CTL_C ||
*pdev != syscon && (c = (unsigned char)ndread(pdev)) == CTL_C)
{
handle(break(pdev, -1);
}
return c;
}
Wrong. If no Ctrl-break (ctrl_break_pressed() returns false), then called second part of condition (c = ndread()). So, my code _is_ correct, and this extra assignemnt is useless code spending.
*You* are wrong. If "ctrl_break_pressed()" returns true, "c" (and therefore the function return value) would be *undefined* without my patch!
+ static struct { /* Boot sector of a RAM-Disk */[...]
+ UBYTE dummy1[3]; /* HIMEM.SYS uses 3, but FDXMS uses 2 */
+ char Name[5];+ } VDISK_BOOT_SECTOR = { + {0xcf,' ',' '}, + {"VDISK"},
Unfortunately, newer standards prohibit to assign nonterminated strings to arrays (ie. 5-character string "VDISK" _plus_ trerminating zero not fit into 5-bytes array, so newer compilers should compain).
Surprisingly, even OpenWatcom 1.3 (so new that it's not even announced!) doesn't complain! ;-)
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel