Bug 79637
| Summary: | bad source code | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | d.binderman |
| Component: | grub | Assignee: | Jeremy Katz <katzj> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.0 | Keywords: | MoveUpstream |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-12-29 06:44:39 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Filed upstream as http://bugcomm.enbug.org/?mode=browse;project=grub;bug_id=15 |
Description of problem: Hello there, I just tried to compile package grub-0.92-7 from Redhat 8.0. Here are some of the compiler messages. fsys_ext2fs.c:494: warning: `str_chk' might be used uninitialized in this function fsys_minix.c:303: warning: `str_chk' might be used uninitialized in this function fsys_reiserfs.c:761: warning: operation on `depth' may be undefined Here is an untested patch which shuts up the compiler. *** ./stage2/fsys_ext2fs.c.old 2002-11-27 09:10:14.000000000 +0000 --- ./stage2/fsys_ext2fs.c 2002-11-27 09:10:36.000000000 +0000 *************** *** 491,497 **** int group_desc; /* fs pointer to that group */ int desc; /* index within that group */ int ino_blk; /* fs pointer of the inode's information */ ! int str_chk; /* used to hold the results of a string compare */ struct ext2_group_desc *gdp; struct ext2_inode *raw_inode; /* inode info corresponding to current_ino */ --- 491,497 ---- int group_desc; /* fs pointer to that group */ int desc; /* index within that group */ int ino_blk; /* fs pointer of the inode's information */ ! int str_chk = 0; /* used to hold the results of a string compare */ struct ext2_group_desc *gdp; struct ext2_inode *raw_inode; /* inode info corresponding to current_ino */ *** ./stage2/fsys_minix.c.old 2002-11-27 09:10:56.000000000 +0000 --- ./stage2/fsys_minix.c 2002-11-27 09:11:20.000000000 +0000 *************** *** 300,306 **** int updir_ino = current_ino; /* the parent of the current directory */ int ino_blk; /* fs pointer of the inode's info */ ! int str_chk; /* used ot hold the results of a string compare */ struct minix_inode * raw_inode; /* inode info for current_ino */ --- 300,306 ---- int updir_ino = current_ino; /* the parent of the current directory */ int ino_blk; /* fs pointer of the inode's info */ ! int str_chk = 0; /* used to hold the results of a string compare */ struct minix_inode * raw_inode; /* inode info for current_ino */ *** ./stage2/fsys_reiserfs.c.old 2002-11-27 09:11:38.000000000 +0000 --- ./stage2/fsys_reiserfs.c 2002-11-27 09:14:01.000000000 +0000 *************** *** 758,764 **** cache = CACHE (depth); else { ! cache = read_tree_node (INFO->blocks[depth], --depth); if (! cache) return 0; } --- 758,765 ---- cache = CACHE (depth); else { ! cache = read_tree_node (INFO->blocks[depth], (depth - 1)); ! --depth; if (! cache) return 0; } Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: