11219 mdb: smbsrv.c: error: comparison between pointer and integer

Review Request #1988 - Created June 8, 2019 and updated

Information
Toomas Soome
illumos-gate
11219
84580fe...
Reviewers
general
../../../common/modules/smbsrv/smbsrv.c: In function 'smb_hash_walk_init':
../../../common/modules/smbsrv/smbsrv.c:1926:11: error: comparison between pointer and integer [-Werror]
  if (addr == NULL) {
           ^~
../../../common/modules/smbsrv/smbsrv.c: In function 'smb_hashstat_walk_init':
../../../common/modules/smbsrv/smbsrv.c:2015:11: error: comparison between pointer and integer [-Werror]
  if (addr == NULL) {
           ^~
cc1: all warnings being treated as errors

  

Issues

  • 8
  • 0
  • 0
  • 8
Description From Last Updated
Space followed-by tab. Gergő Mihály Doma Gergő Mihály Doma
Space followed-by tab. Gergő Mihály Doma Gergő Mihály Doma
Should be: if (wsp->walk_addr == (uintptr_t)NULL) { Gergő Mihály Doma Gergő Mihály Doma
Should be: if (wsp->walk_addr == (uintptr_t)NULL) { Gergő Mihály Doma Gergő Mihály Doma
Should be: if (wsp->walk_addr == (uintptr_t)NULL) { Gergő Mihály Doma Gergő Mihály Doma
Should be: if (wsp->walk_addr == (uintptr_t)NULL) { Gergő Mihály Doma Gergő Mihály Doma
Should be: if (wsp->walk_addr == (uintptr_t)NULL) { Gergő Mihály Doma Gergő Mihály Doma
Should be: if (wsp->walk_addr == (uintptr_t)NULL) { Gergő Mihály Doma Gergő Mihály Doma
Gordon Ross

I think we should just wait these until I've got more of the upstreaming done.
It will be easier for us to merge back these changes if they happen after that.

  1. Actualy, there's not a whole lot more work in mdb after https://github.com/illumos/illumos-gate/pull/55
    so I'll take care of this in that PR.

Gordon Ross

   

Other places in this code we just use zero.
I prefer that.

Gergő Mihály Doma
Whitespace nits and consistency issues.
Space followed-by tab.
Space followed-by tab.

Should be:

    if (wsp->walk_addr == (uintptr_t)NULL) {

Should be:

    if (wsp->walk_addr == (uintptr_t)NULL) {

Should be:

    if (wsp->walk_addr == (uintptr_t)NULL) {

Should be:

    if (wsp->walk_addr == (uintptr_t)NULL) {

Should be:

    if (wsp->walk_addr == (uintptr_t)NULL) {

Should be:

    if (wsp->walk_addr == (uintptr_t)NULL) {
Loading...