-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: added type casting(ngx_atomic_t) in the ngx_vhost_traffic_s…
…tatus_node_init() and ngx_vhost_traffic_status_node_set()
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cba50bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still getting errors,
warning C4197: 'ngx_atomic_t' : top-level volatile in cast is ignored
cba50bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your pull request is reopend.
cba50bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is with Windows/nginx, vc++ compiler (c99), can you explain what you are doing with atomic_t for which an int_t won't work ?
cba50bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, It works fine for me.
In code, I have declared the stat_(in|out)_bytes variables as a type of ngx_atomic_t, so just used for compatibility.
The point of ngx_atomic_t declaration in src/os/unix/ngx_atomic.h as follows:
So maybe the ngx_atomic_uint_t type will be fine without warning in your environment.
Can I get the test result?(ngx_atomic_t to ngx_atomic_uint_t)
cba50bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats it, (ngx_atomic_uint_t) solves it ! something is missing in src/os/unix/ngx_atomic.h or it would have been typecasted.
cba50bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience and the test.
It applied.
7b5d42c