vweb: fix warnings
parent
6921c15b7b
commit
db110759ab
|
@ -84,7 +84,7 @@ pub fn socket_udp() ?Socket {
|
||||||
}
|
}
|
||||||
|
|
||||||
// set socket options
|
// set socket options
|
||||||
pub fn (s Socket) setsockopt(level int, optname int, optvalue *int) ?int {
|
pub fn (s Socket) setsockopt(level int, optname int, optvalue &int) ?int {
|
||||||
res := C.setsockopt(s.sockfd, level, optname, optvalue, C.sizeof(optvalue))
|
res := C.setsockopt(s.sockfd, level, optname, optvalue, C.sizeof(optvalue))
|
||||||
if res < 0 {
|
if res < 0 {
|
||||||
return error('socket: setsockopt failed')
|
return error('socket: setsockopt failed')
|
||||||
|
|
|
@ -313,7 +313,7 @@ struct URL {
|
||||||
pub: mut:
|
pub: mut:
|
||||||
scheme string
|
scheme string
|
||||||
opaque string // encoded opaque data
|
opaque string // encoded opaque data
|
||||||
user *Userinfo // username and password information
|
user &Userinfo // username and password information
|
||||||
host string // host or host:port
|
host string // host or host:port
|
||||||
path string // path (relative paths may omit leading slash)
|
path string // path (relative paths may omit leading slash)
|
||||||
raw_path string // encoded path hint (see escaped_path method)
|
raw_path string // encoded path hint (see escaped_path method)
|
||||||
|
@ -324,7 +324,7 @@ pub: mut:
|
||||||
|
|
||||||
// user returns a Userinfo containing the provided username
|
// user returns a Userinfo containing the provided username
|
||||||
// and no password set.
|
// and no password set.
|
||||||
pub fn user(username string) *Userinfo {
|
pub fn user(username string) &Userinfo {
|
||||||
return &Userinfo{
|
return &Userinfo{
|
||||||
username: username,
|
username: username,
|
||||||
password: '',
|
password: '',
|
||||||
|
@ -340,7 +340,7 @@ pub fn user(username string) *Userinfo {
|
||||||
// ``is NOT RECOMMENDED, because the passing of authentication
|
// ``is NOT RECOMMENDED, because the passing of authentication
|
||||||
// information in clear text (such as URI) has proven to be a
|
// information in clear text (such as URI) has proven to be a
|
||||||
// security risk in almost every case where it has been used.''
|
// security risk in almost every case where it has been used.''
|
||||||
fn user_password(username, password string) *Userinfo {
|
fn user_password(username, password string) &Userinfo {
|
||||||
return &Userinfo{username, password, true}
|
return &Userinfo{username, password, true}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue