1. 12 7月, 2016 7 次提交
  2. 11 7月, 2016 13 次提交
    • P
      PL/Perl: Fix compiler warning · 564b9235
      Peter Eisentraut 提交于
      The code was assigning a (Datum) 0 to a void pointer.  That creates a
      warning from clang 3.4.  It was probably a thinko to begin with.
      564b9235
    • D
      Avoid shifting a negative value · 9def9a34
      Daniel Gustafsson 提交于
      Shifting a negative signed value is undefined behavior in C, instead
      replace with the defined constant that was intended to reach with
      the bitshift. It's not entirely clear to me *why* setting such a low
      value is of interest given that further operations on it can overflow
      to being positive but this keeps the current functionality with one
      less compiler warning.
      9def9a34
    • D
      Remove and rewrite logically inverted if else clauses · 695102dd
      Daniel Gustafsson 提交于
      Normally the compiler can figure out when logical chains have inverted
      truths like: if (foo) {} else if (!foo) {}. When there are more variables
      involved this doesn't always work and we get compiler warnings for unset
      variables which are indeed set. Remove and rewrite offending logic to be
      clearer for the compiler and the human reader.
      695102dd
    • D
      Ensure that the faultinjector will segfault when asked to · 48983e3c
      Daniel Gustafsson 提交于
      Dereferencing address zero is undefined behavior in C and the compiler
      is free to optimize any such calls away (even though that is rare).
      Ensure that any optimizations are avoided by declaring the variable
      volatile and at the same time get rid of a clang compiler warning.
      48983e3c
    • M
      Removed comparison of unsigned expression < 0. · 8ae9689a
      Michael Meskes 提交于
      8ae9689a
    • D
      Fix bug in pattern-match selectivity calculation · b9607260
      Daniel Gustafsson 提交于
      Remove a pointless redefinition of the prefixsel variable and move
      the selec setting into under the else clause as it otherwise over-
      writes the value we just calculated. This shortcircuited the GPDB
      code and fell back on the default upstream behaviour so the effect
      was nullified.
      b9607260
    • D
      Silence compiler warnings due to uninitialized values · 9be20971
      Daniel Gustafsson 提交于
      These variables are unitialized but will be set before used, clang
      doesn't always figure this out though so give a helping hand and
      set a value at initialization. The initalizations in Gin scanning
      were later performed upstream in 87b8db37 as part of a larger body
      of work.
      9be20971
    • D
      Invert enum range check to silence compiler warning · e83f18b4
      Daniel Gustafsson 提交于
      Since the actual datatype used for an enum is implementation specific
      per each compiler in both C90 and C99 we can't rely on it automatically
      being an unsigned integer even though it most likely will be in this
      case. Inverting the check and testing for it's negation will achieve
      the range check that was intended without compiler warnings issued for
      comparison of unsigned enum (-Wtautological-compare in clang). Adding
      a comment explaining this both in the code and the headerfile.
      
      Note that the existing coding was actually incorrect as it was testing
      for the tabletype ranges with logical AND and not logical OR which
      would've been correct, the severity of this bug must be considered
      quite low though.
      e83f18b4
    • T
      Teach the regular expression functions to do case-insensitive matching and · e9aa56b8
      Tom Lane 提交于
      locale-dependent character classification properly when the database encoding
      is UTF8.
      
      The previous coding worked okay in single-byte encodings, or in any case for
      ASCII characters, but failed entirely on multibyte characters.  The fix
      assumes that the <wctype.h> functions use Unicode code points as the wchar
      representation for Unicode, ie, wchar matches pg_wchar.
      
      This is only a partial solution, since we're still stupid about non-ASCII
      characters in multibyte encodings other than UTF8.  The practical effect
      of that is limited, however, since those cases are generally Far Eastern
      glyphs for which concepts like case-folding don't apply anyway.  Certainly
      all or nearly all of the field reports of problems have been about UTF8.
      A more general solution would require switching to the platform's wchar
      representation for all regex operations; which is possible but would have
      substantial disadvantages.  Let's try this and see if it's sufficient in
      practice.
      e9aa56b8
    • D
      Remove assertions that are always true · 78ef01de
      Daniel Gustafsson 提交于
      The BM_MAX_TUPLES_PER_PAGE macro will evaluate to the uint16 max so
      asserting that an OffsetNumber is <= is always true given the typedef
      on OffsetNumber from uint16.
      
      This fixes -Wtautological-constant-out-of-range-compare warnings.
      78ef01de
    • D
      Avoid accessing array outside array bounds · f08cb4ed
      Daniel Gustafsson 提交于
      The @outarr array may at this point be empty and using subscript -1
      to reach the last element will thus throw an uninitialized error.
      Test for array contents before accessing any elements to avoid the
      error and to exit early since the block by definition isn't of
      interest. Observed in the wild for the bfv_partition test suite.
      f08cb4ed
    • D
      Fix some amount of offending whitespace and style in atmsort · 8615af09
      Daniel Gustafsson 提交于
      This is by no means all the offending lines in this file, but they
      were the ones I had to read in order to figure out a bug. Remove
      the worst offenders such as three-space indentation, commented out
      code and and blocks at the wrong level. A larger cleanup is at some
      point needed but piece by piece we are getting this code into shape.
      8615af09
    • A
      s3ext: remove duplicate functions (#930) · d0c61f06
      Adam Lee 提交于
      Signed-off-by: NAdam Lee <ali@pivotal.io>
      d0c61f06
  3. 09 7月, 2016 4 次提交
  4. 08 7月, 2016 8 次提交
  5. 07 7月, 2016 7 次提交
  6. 06 7月, 2016 1 次提交
    • D
      Fix typos in planwindow.c comments · 175236d4
      Daniel Gustafsson 提交于
      While fixing the typo, remove trailing whitespace from the comment
      text as well as setting a postgres style comment header and put the
      return value type on it's own line to match more of the style in
      the file.
      175236d4