Skip to content
  • Nobuyoshi Nakada's avatar
    b7e1eda9
    Suppress warnings by gcc 10.1.0-RC-20200430 · b7e1eda9
    Nobuyoshi Nakada authored
    * Folding results should not be empty.
    
      If `OnigCodePointCount(to->n)` were 0, `for` loop using `fn`
      wouldn't execute and `ncs` elements are not initialized.
    
      ```
      enc/unicode.c:557:21: warning: 'ncs[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
        557 |  for (i = 0; i < ncs[0]; i++) {
            |                  ~~~^~~
      ```
    
    * Cast to `enum yytokentype`
    
      Additional enums for scanner events by ripper are not included
      in `yytokentype`.
    
      ```
      ripper.y:7274:28: warning: implicit conversion from 'enum <anonymous>' to 'enum yytokentype' [-Wenum-conversion]
      ```
    b7e1eda9
    Suppress warnings by gcc 10.1.0-RC-20200430
    Nobuyoshi Nakada authored
    * Folding results should not be empty.
    
      If `OnigCodePointCount(to->n)` were 0, `for` loop using `fn`
      wouldn't execute and `ncs` elements are not initialized.
    
      ```
      enc/unicode.c:557:21: warning: 'ncs[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
        557 |  for (i = 0; i < ncs[0]; i++) {
            |                  ~~~^~~
      ```
    
    * Cast to `enum yytokentype`
    
      Additional enums for scanner events by ripper are not included
      in `yytokentype`.
    
      ```
      ripper.y:7274:28: warning: implicit conversion from 'enum <anonymous>' to 'enum yytokentype' [-Wenum-conversion]
      ```
Loading