Commit Graph

1119 Commits

Author SHA1 Message Date
Brian Behlendorf a1f90df3db Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-08-12 21:27:59 -07:00
Brian Behlendorf 2b89d86fff Initialize resid variable
Properly initialize the variable resid for the error case where
vn_rdwr() returns an error with setting *resid.  In practice
this is harmless because the contents of resid don't matter
when vn_rdwr() returns an error.  But the code does check the
result which means we may or may not end up having the check
zio->io_error.  This makes gcc unhappy and having a completely
deterministic code path here is a good thing.

Closes #51
2010-08-12 21:19:01 -07:00
Brian Behlendorf b1ac2755a0 Merge branch 'gcc-fortify-source' into refs/top-bases/gcc-branch 2010-07-12 10:23:03 -07:00
Brian Behlendorf 007b891fc7 Fix -Werror=format-security compiler option
Noticed under Ubuntu kernel builds, there were two instances where
printf() was not called with a "%s" and instread directly printed
the string.  This can potentially result in a crash and is considered
bad form by gcc.  It has been fixed by adding the needed "%s".
2010-07-12 10:11:48 -07:00
Brian Behlendorf 049a26b800 Merge branch 'gcc-fortify-source' into refs/top-bases/gcc-branch 2010-07-01 10:41:59 -07:00
Brian Behlendorf 3b54f5030e Use VERIFY() for asprintf due to rpm -D_FORTIFY_SOURCE=2
This check is part of ztest and a memory failure here is unlikely.
However, if this does occur simply exiting is an perfectly valid
way to handle the issue and it resulves the compiler warning.

        ztest.c:5522: error: ignoring return value of 'asprintf',
        declared with attribute warn_unused_result
2010-07-01 10:35:11 -07:00
Brian Behlendorf c102394c69 Merge branch 'gcc-fortify-source' into refs/top-bases/gcc-branch 2010-06-29 14:40:48 -07:00
Brian Behlendorf 440c31986c Merge commit 'refs/top-bases/gcc-fortify-source' into gcc-fortify-source 2010-06-29 14:40:47 -07:00
Brian Behlendorf 3b628acf9c Merge branch 'gcc-missing-braces' into refs/top-bases/gcc-branch 2010-06-29 14:40:45 -07:00
Brian Behlendorf a303b641c0 Merge commit 'refs/top-bases/gcc-missing-braces' into gcc-missing-braces 2010-06-29 14:40:44 -07:00
Brian Behlendorf 105026bfc0 Merge branch 'gcc-ident-pragmas' into refs/top-bases/gcc-branch 2010-06-29 14:40:43 -07:00
Brian Behlendorf fb89ea141a Merge commit 'refs/top-bases/gcc-ident-pragmas' into gcc-ident-pragmas 2010-06-29 14:40:42 -07:00
Brian Behlendorf e146159dcd Merge branch 'gcc-64bit-constants' into refs/top-bases/gcc-branch 2010-06-29 14:40:40 -07:00
Brian Behlendorf 4d2b5c1e52 Merge commit 'refs/top-bases/gcc-64bit-constants' into gcc-64bit-constants 2010-06-29 14:40:39 -07:00
Brian Behlendorf 350dd943de Merge branch 'gcc-unused' into refs/top-bases/gcc-branch 2010-06-29 14:40:38 -07:00
Brian Behlendorf 996d43027b Merge commit 'refs/top-bases/gcc-unused' into gcc-unused 2010-06-29 14:40:36 -07:00
Brian Behlendorf ab4a18fd09 Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-06-29 14:40:35 -07:00
Brian Behlendorf 11ce7ab08f Merge commit 'refs/top-bases/gcc-uninit' into gcc-uninit 2010-06-29 14:40:34 -07:00
Brian Behlendorf 6f0f7231e3 Merge branch 'gcc-no-parenthesis' into refs/top-bases/gcc-branch 2010-06-29 14:40:32 -07:00
Brian Behlendorf a1097e9d6f Merge commit 'refs/top-bases/gcc-no-parenthesis' into gcc-no-parenthesis 2010-06-29 14:40:31 -07:00
Brian Behlendorf bd09c31688 Merge branch 'gcc-missing-case' into refs/top-bases/gcc-branch 2010-06-29 14:40:28 -07:00
Brian Behlendorf 15112a9642 Merge commit 'refs/top-bases/gcc-missing-case' into gcc-missing-case 2010-06-29 14:40:27 -07:00
Brian Behlendorf 26cfa9d270 Merge branch 'gcc-invalid-prototype' into refs/top-bases/gcc-branch 2010-06-29 14:40:26 -07:00
Brian Behlendorf 653589b77a Merge commit 'refs/top-bases/gcc-invalid-prototype' into gcc-invalid-prototype 2010-06-29 14:40:25 -07:00
Brian Behlendorf 39b87a2879 Merge branch 'gcc-init-pragmas' into refs/top-bases/gcc-branch 2010-06-29 14:40:23 -07:00
Brian Behlendorf cabec2d73c Merge commit 'refs/top-bases/gcc-init-pragmas' into gcc-init-pragmas 2010-06-29 14:40:22 -07:00
Brian Behlendorf b27a006df9 Merge branch 'gcc-debug' into refs/top-bases/gcc-branch 2010-06-29 14:40:20 -07:00
Brian Behlendorf c112aa6055 Merge commit 'refs/top-bases/gcc-debug' into gcc-debug 2010-06-29 14:40:19 -07:00
Brian Behlendorf bbe19a8b0e Merge branch 'gcc-cast' into refs/top-bases/gcc-branch 2010-06-29 14:40:17 -07:00
Brian Behlendorf 389425ecd7 Merge commit 'refs/top-bases/gcc-cast' into gcc-cast 2010-06-29 14:40:16 -07:00
Brian Behlendorf 1213402460 Merge branch 'gcc-c90' into refs/top-bases/gcc-branch 2010-06-29 14:40:15 -07:00
Brian Behlendorf 731c2d1256 Merge commit 'refs/top-bases/gcc-c90' into gcc-c90 2010-06-29 14:40:14 -07:00
Brian Behlendorf b3c82b1b18 Add basic README
A simple README with a short summary of the project and a link
directing people to the online documentation.
2010-06-29 14:35:21 -07:00
Brian Behlendorf 192b36dcfd Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-06-29 10:25:31 -07:00
Brian Behlendorf 9cdd80e387 Revert traverse_impl() changes
These changes are now taken care of by the fix-stack-traverse_impl
topic branch which not only solves the uninit problem but also
moves these locals off the stack and on to the heap.
2010-06-29 10:24:14 -07:00
Brian Behlendorf c2793dd0c7 Merge branch 'gcc-missing-braces' into refs/top-bases/gcc-branch 2010-06-28 11:30:34 -07:00
Brian Behlendorf 5b02d6c084 Zero struct for zdb dump_block_stats
Accidentally dropped the zeroing of this structure in the
gcc-missing-braces topic branch which was causing a fall positive
space leak in ztest.  Ensure the structure is zero'ed before use.
2010-06-28 10:48:24 -07:00
Brian Behlendorf ef3ec1c9ed Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-06-28 10:36:11 -07:00
Brian Behlendorf 52bb0d8e75 Ensure zio_bad_cksum_t is initialized
This may not strictly be needed but it does keep gcc happy.  We
should keep our eye on this though if the extra bcopy significantly
impacts performance.  It may.
2010-06-28 10:30:38 -07:00
Brian Behlendorf 877a37d8bd Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-06-16 12:11:18 -07:00
Brian Behlendorf 8a001d8f59 Extra uninit vars flagged by gcc 4.1.2
Newer versions of the compiler are OK with this but for the sake of
older compilers explicitly initialize them.
2010-06-16 11:45:07 -07:00
Brian Behlendorf 5fa2cb516b Merge branch 'gcc-missing-braces' into refs/top-bases/gcc-branch 2010-06-14 15:51:50 -07:00
Brian Behlendorf 696ec7fb61 Update gcc-missing-braces based on structure changes
Almost exclusively this patch handled the addition of another char
array to the zfs_cmd_t structure.  Unfortunately c90 doesn't allow
zero filling the entire struct with the '= { 0 };' shorthand.
2010-06-14 15:44:06 -07:00
Brian Behlendorf dfe881c0ef Merge branch 'gcc-unused' into refs/top-bases/gcc-branch 2010-06-14 15:37:01 -07:00
Brian Behlendorf 1e7a75049a Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-06-14 15:37:00 -07:00
Brian Behlendorf c8d75a1c9d Merge branch 'gcc-no-parenthesis' into refs/top-bases/gcc-branch 2010-06-14 15:37:00 -07:00
Brian Behlendorf d9f910d423 Merge branch 'gcc-missing-case' into refs/top-bases/gcc-branch 2010-06-14 15:36:59 -07:00
Brian Behlendorf 993fa8c15c Merge branch 'gcc-invalid-prototype' into refs/top-bases/gcc-branch 2010-06-14 15:36:59 -07:00
Brian Behlendorf 2c95012288 Merge branch 'gcc-c90' into refs/top-bases/gcc-branch 2010-06-14 15:36:59 -07:00
Brian Behlendorf 3135b5a26a Update gcc-c90 minor updates
Originally these changes were on other gcc-* topic branches but
because c90 touches the same bit of code and I'd like to keep all
the gcc-* branches completely parallel I've moved these few bits
over here.  This is one of the downsides of not just having one
big patch stack.
2010-06-14 15:32:54 -07:00