Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smb.c: Fixed 'bad suffix on number' on VC6 & 7 #2211

wants to merge 2 commits into from

smb.c: Fixed 'bad suffix on number' on VC6 & 7 #2211

wants to merge 2 commits into from


Copy link

No description provided.

Copy link

bagder commented Jan 4, 2018

./smb.c:735:2: warning: Trailing whitespace (TRAILINGSPACE)

@bagder bagder removed the needs-info label Jan 8, 2018
Copy link

bagder commented Jan 8, 2018

The function get_posix_time() is a weird one:

First, we should fix the second argument to not use a void pointer and instead pass in a correct type. Then, it seems the second argument is only ever &smb_m->last_change_time and I can't find any code that actually sets the last_change_time struct member to anything, so I can't see how that is ever anything but zero?

Copy link

bagder commented Jan 15, 2018

How about changing the order of the math?

If we divide with 10 million first, we can deduct a much smaller value that shouldn't need any suffix at all for any compiler?

  timestamp /= 10000000;
  timestamp -= 11644473600;

If my thinking is right, it shouldn't change the net result.

Copy link

@bagder Anything that suits you. I just want to make it compile 😉

bagder added a commit that referenced this pull request Jan 15, 2018
1. don't use "ULL" suffix since unsupported in older MSVC
2. use curl_off_t instead of custom long long ifdefs
3. make get_posix_time() not do unaligned data access

Fixes #2211
Reported-by: Chester Liu
@bagder bagder closed this in 25c40c9 Jan 16, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018
@skyline75489 skyline75489 deleted the patch-1 branch April 4, 2019 07:49
@bagder bagder added the SMB label May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Successfully merging this pull request may close these issues.

None yet

2 participants