Fix various warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35900 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4fa9985629
commit
d362993433
@ -355,8 +355,8 @@ uint64 root_folder_attrs_2 = 0xdeadbeef50385038LL; // volume id, just in case
|
||||
|
||||
struct attr_entry root_folder_attrs[] = {
|
||||
{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-directory") },
|
||||
{ "BEOS:M:STD_ICON", 'MICN', 16*16, google_icon_M },
|
||||
{ "BEOS:L:STD_ICON", 'ICON', 32*32, google_icon_L },
|
||||
{ "BEOS:M:STD_ICON", 'MICN', 16*16, (char *)google_icon_M },
|
||||
{ "BEOS:L:STD_ICON", 'ICON', 32*32, (char *)google_icon_L },
|
||||
{ "BEOS:V:STD_ICON", 'zICO', sizeof(google_icon_SVG), google_icon_SVG },
|
||||
{ "BEOS:D:STD_ICON", 0x6949434F, sizeof(root_folder_attrs_1), &root_folder_attrs_1 },
|
||||
{ "BEOS:ICON", 'VICN', sizeof(google_icon_HVIF), google_icon_HVIF },
|
||||
@ -404,7 +404,7 @@ struct attr_entry bookmark_attrs[] = {
|
||||
};
|
||||
|
||||
/* for debugging */
|
||||
static int32 fake_bm_attr_1 = 1;
|
||||
//static int32 fake_bm_attr_1 = 1;
|
||||
struct attr_entry fake_bookmark_attrs[] = {
|
||||
{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-bookmark") },
|
||||
{ "META:title", 'CSTR', SZSTR("Plop!") },
|
||||
@ -442,7 +442,7 @@ static uint8 template_1_attrs_8[] = {
|
||||
static uint8 template_1_attrs_9[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x58, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x44,
|
||||
0x00, 0x00, 0x0c, 0x44 };
|
||||
static uint8 template_1_attrs_10[] = {
|
||||
/*static uint8 template_1_attrs_10[] = {
|
||||
0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x69, 0x74, 0x6c,
|
||||
0x65, 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0x00, 0x50, 0x43, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,
|
||||
0x00, 0x00, 0x4d, 0x45, 0x54, 0x41, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x52, 0x7d, 0xfb,
|
||||
@ -461,7 +461,7 @@ static uint8 template_1_attrs_10[] = {
|
||||
0x67, 0x6c, 0x65, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x00, 0xc0, 0x55, 0x44, 0x00, 0x00,
|
||||
0x70, 0x41, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45,
|
||||
0x3a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00,
|
||||
0x00 };
|
||||
0x00 };*/
|
||||
static uint8 template_1_attrs_11[] = {
|
||||
0x52, 0xf5, 0x5e, 0x6f, 0x0a, 0x00, 0x00, 0x00, 0x74, 0x73, 0x6c, 0x54, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <OS.h>
|
||||
#include <KernelExport.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <netinet/in.h>
|
||||
@ -12,9 +13,11 @@
|
||||
#include <malloc.h>
|
||||
#include <sys/socket.h>
|
||||
#include "http_cnx.h"
|
||||
#include "googlefs.h"
|
||||
#include "google_request.h"
|
||||
#include "lists2.h"
|
||||
#include "settings.h"
|
||||
#include "string_utils.h"
|
||||
|
||||
#define DO_PUBLISH
|
||||
//#define FAKE_INPUT "/boot/home/devel/drivers/googlefs/log2.html"
|
||||
@ -35,14 +38,14 @@
|
||||
extern int google_parse_results(const char *html, size_t htmlsize, struct google_result **results);
|
||||
|
||||
// move that to ksocket inlined
|
||||
static kinet_aton(const char *in, struct in_addr *addr)
|
||||
static int kinet_aton(const char *in, struct in_addr *addr)
|
||||
{
|
||||
int i;
|
||||
unsigned long a;
|
||||
uint32 inaddr = 0L;
|
||||
const char *p = in;
|
||||
for (i = 0; i < 4; i++) {
|
||||
a = strtoul(p, &p, 10);
|
||||
a = strtoul(p, (char **)&p, 10);
|
||||
if (!p)
|
||||
return -1;
|
||||
inaddr = (inaddr >> 8) | ((a & 0x0ff) << 24);
|
||||
@ -55,14 +58,14 @@ static kinet_aton(const char *in, struct in_addr *addr)
|
||||
}
|
||||
|
||||
|
||||
status_t google_request_init()
|
||||
status_t google_request_init(void)
|
||||
{
|
||||
status_t err;
|
||||
err = http_init();
|
||||
return err;
|
||||
}
|
||||
|
||||
status_t google_request_uninit()
|
||||
status_t google_request_uninit(void)
|
||||
{
|
||||
status_t err;
|
||||
err = http_uninit();
|
||||
@ -74,8 +77,8 @@ status_t google_request_process(struct google_request *req)
|
||||
struct sockaddr_in sin;
|
||||
struct http_cnx *cnx = NULL;
|
||||
struct google_result *res;
|
||||
int err, i, count;
|
||||
size_t len;
|
||||
status_t err;
|
||||
int count;
|
||||
char *p = NULL;
|
||||
char *url = NULL;
|
||||
|
||||
@ -106,7 +109,7 @@ status_t google_request_process(struct google_request *req)
|
||||
if (!url)
|
||||
goto err_url;
|
||||
strcpy(url, BASEURL);
|
||||
sprintf(url+strlen(url), FMT_NUM, max_results);
|
||||
sprintf(url+strlen(url), FMT_NUM, (unsigned int)max_results);
|
||||
sprintf(url+strlen(url), FMT_Q, p);
|
||||
|
||||
dprintf("google_request: final URL: %s\n", url);
|
||||
@ -115,7 +118,7 @@ status_t google_request_process(struct google_request *req)
|
||||
dprintf("google_request: http_get: error 0x%08lx\n", err);
|
||||
if (err < 0)
|
||||
goto err_url2;
|
||||
dprintf("google_request: http_get: HEADERS %d:%s\n", cnx->headerslen, cnx->headers);
|
||||
dprintf("google_request: http_get: HEADERS %ld:%s\n", cnx->headerslen, cnx->headers);
|
||||
//dprintf("DATA: %d:%s\n", cnx->datalen, cnx->data);
|
||||
|
||||
dprintf("google_request: buffer @ %p, len %ld\n", cnx->data, cnx->datalen);
|
||||
@ -216,4 +219,5 @@ status_t google_request_free(struct google_request *req)
|
||||
return EINVAL;
|
||||
free(req->query_string);
|
||||
free(req);
|
||||
return B_OK;
|
||||
}
|
||||
|
@ -30,8 +30,8 @@ struct google_result {
|
||||
char similar_url[GR_MAX_URL];
|
||||
};
|
||||
|
||||
extern status_t google_request_init();
|
||||
extern status_t google_request_uninit();
|
||||
extern status_t google_request_init(void);
|
||||
extern status_t google_request_uninit(void);
|
||||
extern status_t google_request_process(struct google_request *req);
|
||||
extern status_t google_request_process_async(struct google_request *req);
|
||||
extern status_t google_request_close(struct google_request *req);
|
||||
|
@ -52,6 +52,7 @@ struct attr_entry {
|
||||
void *value;
|
||||
};
|
||||
|
||||
#undef ASSERT
|
||||
#define ASSERT(op) if (!(op)) panic("ASSERT: %s in %s:%s", #op, __FILE__, __FUNCTION__)
|
||||
|
||||
struct mount_fs_params
|
||||
|
@ -4,6 +4,8 @@
|
||||
*/
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <KernelExport.h>
|
||||
#include "vnidpool.h"
|
||||
|
||||
/* primary type for the bitmap */
|
||||
@ -34,7 +36,7 @@ status_t vnidpool_alloc(struct vnidpool **pool, size_t size)
|
||||
p->bitmap = (BMT *)(p + 1);
|
||||
p->bmsize = size;
|
||||
memset(p->bitmap, 0, size / sizeof(BMT));
|
||||
dprintf("vnidpool_alloc: pool @ %p, bitmap @ %p, size %d\n", p, p->bitmap, p->bmsize);
|
||||
dprintf("vnidpool_alloc: pool @ %p, bitmap @ %p, size %ld\n", p, p->bitmap, p->bmsize);
|
||||
*pool = p;
|
||||
return B_OK;
|
||||
}
|
||||
@ -84,7 +86,6 @@ status_t vnidpool_get(struct vnidpool *pool, ino_t *vnid)
|
||||
status_t vnidpool_put(struct vnidpool *pool, ino_t vnid)
|
||||
{
|
||||
status_t err = B_ERROR;
|
||||
uint32 i;
|
||||
if (!pool)
|
||||
return EINVAL;
|
||||
if (LOCK(&pool->lock) < B_OK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user