Print this page
6436 156 lint errors in common/crypto/edonr/edonr.c

Split Close
Expand all
Collapse all
          --- old/usr/src/common/crypto/edonr/edonr.c
          +++ new/usr/src/common/crypto/edonr/edonr.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  17   17   * If applicable, add the following below this CDDL HEADER, with the
  18   18   * fields enclosed by brackets "[]" replaced with your own identifying
  19   19   * information: Portions Copyright [yyyy] [name of copyright owner]
  20   20   *
  21   21   * CDDL HEADER END
  22   22   *
  23   23   * Copyright (C) 2009, 2010, Jorn Amundsen <jorn.amundsen@ntnu.no>
  24   24   * Tweaked Edon-R implementation for SUPERCOP, based on NIST API.
  25   25   *
  26      - * $Id: edonr.c 517 2013-02-17 20:34:39Z joern $
  27   26   */
  28   27  /*
  29   28   * Portions copyright (c) 2013, Saso Kiselkov, All rights reserved
       29 + * Copyright 2016 Gary Mills
  30   30   */
  31   31  
  32   32  /* determine where we can get bcopy/bzero declarations */
  33   33  #ifdef  _KERNEL
  34   34  #include <sys/systm.h>
  35   35  #else
  36   36  #include <strings.h>
  37   37  #endif
  38   38  #include <sys/edonr.h>
  39   39  #include <sys/debug.h>
↓ open down ↓ 612 lines elided ↑ open up ↑
 652  652                  }
 653  653  
 654  654                  state->bits_processed += Q512(databitlen, data64,
 655  655                      hashState512(state)->DoublePipe);
 656  656                  break;
 657  657          }
 658  658  
 659  659          switch (state->hashbitlen) {
 660  660          case 224: {
 661  661  #if defined(MACHINE_IS_BIG_ENDIAN)
      662 +                /* LINTED: pointer cast may result in improper alignment */
 662  663                  uint32_t *d32 = (uint32_t *)hashval;
 663  664                  uint32_t *s32 = hashState224(state)->DoublePipe + 9;
 664  665                  int j;
 665  666  
 666  667                  for (j = 0; j < EdonR224_DIGEST_SIZE >> 2; j++)
 667  668                          st_swap32(s32[j], d32 + j);
 668  669  #else
 669  670                  bcopy(hashState256(state)->DoublePipe + 9, hashval,
 670  671                      EdonR224_DIGEST_SIZE);
 671  672  #endif
 672  673                  break;
 673  674          }
 674  675          case 256: {
 675  676  #if defined(MACHINE_IS_BIG_ENDIAN)
      677 +                /* LINTED: pointer cast may result in improper alignment */
 676  678                  uint32_t *d32 = (uint32_t *)hashval;
 677  679                  uint32_t *s32 = hashState224(state)->DoublePipe + 8;
 678  680                  int j;
 679  681  
 680  682                  for (j = 0; j < EdonR256_DIGEST_SIZE >> 2; j++)
 681  683                          st_swap32(s32[j], d32 + j);
 682  684  #else
 683  685                  bcopy(hashState256(state)->DoublePipe + 8, hashval,
 684  686                      EdonR256_DIGEST_SIZE);
 685  687  #endif
 686  688                  break;
 687  689          }
 688  690          case 384: {
 689  691  #if defined(MACHINE_IS_BIG_ENDIAN)
      692 +                /* LINTED: pointer cast may result in improper alignment */
 690  693                  uint64_t *d64 = (uint64_t *)hashval;
 691  694                  uint64_t *s64 = hashState384(state)->DoublePipe + 10;
 692  695                  int j;
 693  696  
 694  697                  for (j = 0; j < EdonR384_DIGEST_SIZE >> 3; j++)
 695  698                          st_swap64(s64[j], d64 + j);
 696  699  #else
 697  700                  bcopy(hashState384(state)->DoublePipe + 10, hashval,
 698  701                      EdonR384_DIGEST_SIZE);
 699  702  #endif
 700  703                  break;
 701  704          }
 702  705          case 512: {
 703  706  #if defined(MACHINE_IS_BIG_ENDIAN)
      707 +                /* LINTED: pointer cast may result in improper alignment */
 704  708                  uint64_t *d64 = (uint64_t *)hashval;
 705  709                  uint64_t *s64 = hashState512(state)->DoublePipe + 8;
 706  710                  int j;
 707  711  
 708  712                  for (j = 0; j < EdonR512_DIGEST_SIZE >> 3; j++)
 709  713                          st_swap64(s64[j], d64 + j);
 710  714  #else
 711  715                  bcopy(hashState512(state)->DoublePipe + 8, hashval,
 712  716                      EdonR512_DIGEST_SIZE);
 713  717  #endif
↓ open down ↓ 16 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX