Print this page
LINTED a bad cast align warning that seems to be oddly omnios specific.
I think the alignment of any pointer we receive from mdb_zalloc must be
sufficiently aligned for 'long' on both x86 platforms.

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/i86pc/modules/unix/unix.c
          +++ new/usr/src/cmd/mdb/i86pc/modules/unix/unix.c
↓ open down ↓ 852 lines elided ↑ open up ↑
 853  853                  return (DCMD_ERR);
 854  854          }
 855  855  
 856  856          if (mdb_readvar(fset, "x86_featureset") != sz) {
 857  857                  mdb_warn("failed to read x86_featureset");
 858  858                  mdb_free(fset, sz);
 859  859                  return (DCMD_ERR);
 860  860          }
 861  861  
 862  862          for (ii = 0; ii < NUM_X86_FEATURES; ii++) {
      863 +                /* LINTED */
 863  864                  if (!BT_TEST((ulong_t *)fset, ii))
 864  865                          continue;
 865  866  
 866  867                  if (mdb_vread(&nptr, sizeof (char *), sym.st_value +
 867  868                      sizeof (void *) * ii) != sizeof (char *)) {
 868  869                          mdb_warn("failed to read feature array %d", ii);
 869  870                          mdb_free(fset, sz);
 870  871                          return (DCMD_ERR);
 871  872                  }
 872  873  
↓ open down ↓ 62 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX