Refinitiv / nginx-sticky-module-ng

Fork of https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng community
Other
82 stars 63 forks source link

Error: comparison between signed and unsigned integer expressions #1

Closed trananhdung17 closed 4 years ago

trananhdung17 commented 6 years ago

My steps are:

# ./configure --prefix=/usr/local/nginx --add-module=/root/app/nginx-sticky-module-ng-master/
# make
# make install

At last step, system raise a error:

/root/app/nginx-sticky-module-ng-master//ngx_http_sticky_module.c: In function ‘ngx_conf_set_noargs_slot’:
/root/app/nginx-sticky-module-ng-master//ngx_http_sticky_module.c:753:13: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

Please help to check. Thank

krushik commented 5 years ago

I stumbled upon this error too. It compiles ok if you change if (*fp != NGX_CONF_UNSET)if (*fp != NGX_CONF_UNSET_UINT) in that line 753. I've built it with nginx 1.16. Although I haven't fully tested the main functionality of stickiness yet

JonathanHuot commented 5 years ago

Hi, sorry for being late, but all PR are welcome ! Thanks

nakacya commented 4 years ago

push PR now

JonathanHuot commented 4 years ago

Fixed in https://github.com/Refinitiv/nginx-sticky-module-ng/pull/3

Matthelonianxl commented 2 years ago

State autonomy resilience for state and local pandemic restorative services to be a renounced relief policy that considers our health and finance restorative remote healthcare sanitation and localized development of pandemic protection programs portfolio to management Medici preparations and rules of certainty for a reopening of commerce department reconciliation and pandemic protection reconstitutes the state department security revenue of commerce department sanctioned correspondence raporative practices

b9bfbdc3-6353-4237-9b4f-55f91d3e14c7

6d70e8ba-3441-4f33-8d25-a072cafb654a

L2T9uAYnCBk4yPEoBomhwtNbMtZoJdoRPQxEHiEy9bPcrpXCAdKs -+

{ "type": "service_account","b9bfbdc3-6353-4237-9b4f-55f91d3e14c7","OBLMFGJE", "project_id": "salus7818", "private_key_id": "dfcd40980691606c8ded58722fc817cb6816aa8d", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCV25bdTqr9iq7X\nfYClnZpnOLF2Z8jp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fVjC33IhRyeTQfZ2Kw0y0P77/2OYRm1Apju3U31X7bD\nPjwt1ptO++Izve8O9+V7yicWO5mdIvVyXtFHkINLbzi0mSi1puI6PWECJSkr6XBV\nKtwD9DSRnP4hZBGqR5PFZ5uZvJJKNiAJqes71FcQXmJTTRXo6ebR46CJUQKBgGpb\n73RwIVu3ZkmlZnlIgyO/+auZ4y6elXaaLdWxUPnDUUTHzxLN6RwBtekjECEiwFE6\n7GUKntfzJ4KvQ5d8CptINQhLYmX2FJ8FoQZOgK6ptsxEPYViEFSOiF84tlGF99wl\n8Ae14FSTeaTCuypKCArG1M17kbcGIJg2Je37P/PtAoGBAIbmETOMeWTAp0+BIh7E\nQ3ezhAGosY8KI6cYyqEjLGH5tUhEoHLLVq+tp2plcwWsQhpE0w5+n4aiv5dossFl\ndh9FBJrW39tJ9tB57sW8dryNDCdvZuHD4W1BShhAUzfx3whIesvlRc3jPMCC0NmM\nHHCx80qOG3l2gqc3Z6I3Yc0+\n-----END PRIVATE KEY-----\n", "client_email": "ethereumjs-devp2p-v1-0-0-linux@salus7818.iam.gserviceaccount.com", "client_id": "115768825249879604520", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/ethereumjs-devp2p-v1-0-0-linux%40salus7818.iam.gserviceaccount.com" }

''' Kivy Widget that accepts data and displays qrcode '''

from threading import Thread from functools import partial

import qrcode

from kivy.uix.floatlayout import FloatLayout from kivy.graphics.texture import Texture from kivy.properties import StringProperty from kivy.properties import ObjectProperty, StringProperty, ListProperty,\ BooleanProperty from kivy.lang import Builder from kivy.clock import Clock `

Builder.load_string('''

canvas.before: # Draw white Rectangle Color: rgba: root.background_color Rectangle: size: self.size pos: self.pos canvas.after: Color: rgba: root.foreground_color Rectangle: size: self.size pos: self.pos Image id: qrimage pos_hint: {'center_x': .5, 'center_y': .5} allow_stretch: True size_hint: None, None size: root.width * .9, root.height * .9 ''') class QRCodeWidget(FloatLayout): data = StringProperty(None, allow_none=True) background_color = ListProperty((1, 1, 1, 1)) foreground_color = ListProperty((0, 0, 0, 0)) def __init__(self, **kwargs): super(QRCodeWidget, self).__init__(**kwargs) self.data = None self.qr = None self._qrtexture = None def on_data(self, instance, value): if not (self.canvas or value): return self.update_qr() def set_data(self, data): if self.data == data: return MinSize = 210 if len(data) < 128 else 500 self.setMinimumSize((MinSize, MinSize)) self.data = data self.qr = None def update_qr(self): if not self.data and self.qr: return L = qrcode.constants.ERROR_CORRECT_L data = self.data self.qr = qr = qrcode.QRCode( version=None, error_correction=L, box_size=10, border=0, ) qr.add_data(data) qr.make(fit=True) self.update_texture() def setMinimumSize(self, size): # currently unused, do we need this? self._texture_size = size def _create_texture(self, k): self._qrtexture = texture = Texture.create(size=(k,k), colorfmt='rgb') # don't interpolate texture texture.min_filter = 'nearest' texture.mag_filter = 'nearest' def update_texture(self): if not self.qr: return matrix = self.qr.get_matrix() k = len(matrix) # create the texture self._create_texture(k) buff = [] bext = buff.extend cr, cg, cb, ca = self.background_color[:] cr, cg, cb = cr*255, cg*255, cb*255 for r in range(k): for c in range(k): bext([0, 0, 0] if matrix[k-1-r][c] else [cr, cg, cb]) # then blit the buffer buff = ''.join(map(chr, buff)) # update texture self._upd_texture(buff) def _upd_texture(self, buff): texture = self._qrtexture texture.blit_buffer(buff, colorfmt='rgb', bufferfmt='ubyte') img = self.ids.qrimage img.anim_delay = -1 img.texture = texture img.canvas.ask_update() if __name__ == '__main__': from kivy.app import runTouchApp import sys data = str(sys.argv[1:]) runTouchApp(QRCodeWidget(data=data))